File size: 2,430 Bytes
3a1f378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1f58227
3a1f378
 
1f58227
 
 
 
 
 
 
 
 
 
 
 
 
3a1f378
1f58227
 
3a1f378
 
 
1f58227
3a1f378
 
 
 
1f58227
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Dataset_STT



This dataset is designed for speech-to-text (STT) tasks and contains audio files along with their corresponding transcripts for the Uzbek language. The dataset is organized into two main directories: one for the audio files and another for the transcript files. Each of these directories is further divided by language (`uz`) and by the data split: `train`, `test`, and `validation`.



## Dataset Structure



Dataset_STT/
β”œβ”€β”€ audio/
β”‚   β”œβ”€β”€ uz/
β”‚   β”‚   β”œβ”€β”€ test/
β”‚   β”‚   β”‚   └── test.tar 
β”‚   β”‚   β”œβ”€β”€ train/
β”‚   β”‚   β”‚   └── train.tar 
β”‚   β”‚   └── validation/
β”‚   β”‚       └── validation.tar 
β”œβ”€β”€ transcript/
β”‚   β”œβ”€β”€ uz/
β”‚   β”‚   β”œβ”€β”€ test/
β”‚   β”‚   β”‚   └── test.tsv
β”‚   β”‚   β”œβ”€β”€ train/
β”‚   β”‚   β”‚   └── train.tsv
β”‚   β”‚   └── validation/
β”‚   β”‚       └── validation.tsv


## Files Description

- **Audio Files:**  
  The audio files are stored as tar archives for each data split (train, test, and validation). Each tar archive contains the actual audio recordings (e.g., in MP3 format).

- **Transcript Files:**  
  The transcript files are provided in TSV format with the following columns:
  - `id`
  - `path` (the filename of the audio file within the tar archive)
  - `sentence` (the transcription)
  - `duration` (audio duration in seconds)
  - `age`
  - `gender`
  - `accents`
  - `locale`

- **Custom Loader (`dataset_stt.py`):**  

  This script extracts audio files from the tar archives and pairs them with their metadata from the transcript TSV files. It returns the audio data using the `datasets.Audio` feature (with a sampling rate of 16000 Hz), which enables interactive playback in the Hugging Face dataset viewer.



## How to Load the Dataset



You can load the dataset using the Hugging Face `datasets` library. For example:



```python

from datasets import load_dataset



data_files = {

    "train": {"audio": "audio/uz/train/train.tar", "transcript": "transcript/uz/train/train.tsv"},

    "test": {"audio": "audio/uz/test/test.tar", "transcript": "transcript/uz/test/test.tsv"},

    "validation": {"audio": "audio/uz/validation/validation.tar", "transcript": "transcript/uz/validation/validation.tsv"}

}



dataset = load_dataset("Elyordev/Dataset_STT", data_files=data_files)

print(dataset)