Datasets:
Commit
•
d91f572
0
Parent(s):
Update files from the datasets library (from 1.16.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.16.0
- .gitattributes +27 -0
- README.md +191 -0
- dataset_infos.json +1 -0
- dummy/dutch/2.1.0/dummy_data.zip +3 -0
- dummy/french/2.1.0/dummy_data.zip +3 -0
- dummy/german/2.1.0/dummy_data.zip +3 -0
- dummy/italian/2.1.0/dummy_data.zip +3 -0
- dummy/polish/2.1.0/dummy_data.zip +3 -0
- dummy/portuguese/2.1.0/dummy_data.zip +3 -0
- dummy/spanish/2.1.0/dummy_data.zip +3 -0
- multilingual_librispeech.py +153 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pretty_name: MultiLingual LibriSpeech
|
3 |
+
annotations_creators:
|
4 |
+
- expert-generated
|
5 |
+
language_creators:
|
6 |
+
- crowdsourced
|
7 |
+
- expert-generated
|
8 |
+
languages:
|
9 |
+
- de
|
10 |
+
- nl
|
11 |
+
- fr
|
12 |
+
- it
|
13 |
+
- es
|
14 |
+
- pt
|
15 |
+
- pl
|
16 |
+
licenses:
|
17 |
+
- cc-by-4-0
|
18 |
+
multilinguality:
|
19 |
+
- monolingual
|
20 |
+
paperswithcode_id: librispeech-1
|
21 |
+
size_categories:
|
22 |
+
- 100K<n<1M
|
23 |
+
source_datasets:
|
24 |
+
- original
|
25 |
+
task_categories:
|
26 |
+
- speech-processing
|
27 |
+
task_ids:
|
28 |
+
- automatic-speech-recognition
|
29 |
+
---
|
30 |
+
|
31 |
+
# Dataset Card for MultiLingual LibriSpeech
|
32 |
+
|
33 |
+
## Table of Contents
|
34 |
+
- [Dataset Description](#dataset-description)
|
35 |
+
- [Dataset Summary](#dataset-summary)
|
36 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
37 |
+
- [Languages](#languages)
|
38 |
+
- [Dataset Structure](#dataset-structure)
|
39 |
+
- [Data Instances](#data-instances)
|
40 |
+
- [Data Fields](#data-fields)
|
41 |
+
- [Data Splits](#data-splits)
|
42 |
+
- [Dataset Creation](#dataset-creation)
|
43 |
+
- [Curation Rationale](#curation-rationale)
|
44 |
+
- [Source Data](#source-data)
|
45 |
+
- [Annotations](#annotations)
|
46 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
47 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
48 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
49 |
+
- [Discussion of Biases](#discussion-of-biases)
|
50 |
+
- [Other Known Limitations](#other-known-limitations)
|
51 |
+
- [Additional Information](#additional-information)
|
52 |
+
- [Dataset Curators](#dataset-curators)
|
53 |
+
- [Licensing Information](#licensing-information)
|
54 |
+
- [Citation Information](#citation-information)
|
55 |
+
- [Contributions](#contributions)
|
56 |
+
|
57 |
+
## Dataset Description
|
58 |
+
|
59 |
+
- **Homepage:** [MultiLingual LibriSpeech ASR corpus](http://www.openslr.org/94)
|
60 |
+
- **Repository:** [Needs More Information]
|
61 |
+
- **Paper:** [MLS: A Large-Scale Multilingual Dataset for Speech Research](https://arxiv.org/abs/2012.03411)
|
62 |
+
- **Leaderboard:** [Paperswithcode Leaderboard](https://paperswithcode.com/dataset/multilingual-librispeech)
|
63 |
+
|
64 |
+
### Dataset Summary
|
65 |
+
|
66 |
+
Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.
|
67 |
+
|
68 |
+
### Supported Tasks and Leaderboards
|
69 |
+
|
70 |
+
- `automatic-speech-recognition`, `speaker-identification`: The dataset can be used to train a model for Automatic Speech Recognition (ASR). The model is presented with an audio file and asked to transcribe the audio file to written text. The most common evaluation metric is the word error rate (WER). The task has an active leaderboard which can be found at https://paperswithcode.com/dataset/multilingual-librispeech and ranks models based on their WER.
|
71 |
+
|
72 |
+
### Languages
|
73 |
+
|
74 |
+
The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish
|
75 |
+
|
76 |
+
## Dataset Structure
|
77 |
+
|
78 |
+
### Data Instances
|
79 |
+
|
80 |
+
A typical data point comprises the path to the audio file, usually called `file` and its transcription, called `text`. Some additional information about the speaker and the passage which contains the transcription is provided.
|
81 |
+
|
82 |
+
```
|
83 |
+
{'chapter_id': 141231,
|
84 |
+
'file': '/home/patrick/.cache/huggingface/datasets/downloads/extracted/b7ded9969e09942ab65313e691e6fc2e12066192ee8527e21d634aca128afbe2/dev_clean/1272/141231/1272-141231-0000.flac',
|
85 |
+
'audio': {'path': '/home/patrick/.cache/huggingface/datasets/downloads/extracted/b7ded9969e09942ab65313e691e6fc2e12066192ee8527e21d634aca128afbe2/dev_clean/1272/141231/1272-141231-0000.flac',
|
86 |
+
'array': array([-0.00048828, -0.00018311, -0.00137329, ..., 0.00079346,
|
87 |
+
0.00091553, 0.00085449], dtype=float32),
|
88 |
+
'sampling_rate': 16000},
|
89 |
+
'id': '1272-141231-0000',
|
90 |
+
'speaker_id': 1272,
|
91 |
+
'text': 'A MAN SAID TO THE UNIVERSE SIR I EXIST'}
|
92 |
+
```
|
93 |
+
|
94 |
+
|
95 |
+
### Data Fields
|
96 |
+
|
97 |
+
- file: A path to the downloaded audio file in .flac format.
|
98 |
+
|
99 |
+
- audio: A dictionary containing the path to the downloaded audio file, the decoded audio array, and the sampling rate. Note that when accessing the audio column: `dataset[0]["audio"]` the audio file is automatically decoded and resampled to `dataset.features["audio"].sampling_rate`. Decoding and resampling of a large number of audio files might take a significant amount of time. Thus it is important to first query the sample index before the `"audio"` column, *i.e.* `dataset[0]["audio"]` should **always** be preferred over `dataset["audio"][0]`.
|
100 |
+
|
101 |
+
- text: the transcription of the audio file.
|
102 |
+
|
103 |
+
- id: unique id of the data sample.
|
104 |
+
|
105 |
+
- speaker_id: unique id of the speaker. The same speaker id can be found for multiple data samples.
|
106 |
+
|
107 |
+
- chapter_id: id of the audiobook chapter which includes the transcription.
|
108 |
+
|
109 |
+
### Data Splits
|
110 |
+
|
111 |
+
| | Train | Train.9h | Train.1h | Dev | Test |
|
112 |
+
| ----- | ------ | ----- | ---- | ---- | ---- |
|
113 |
+
| german | 469942 | 2194 | 241 | 3469 | 3394 |
|
114 |
+
| dutch | 374287 | 2153 | 234 | 3095 | 3075 |
|
115 |
+
| french | 258213 | 2167 | 241 | 2416 | 2426 |
|
116 |
+
| spanish | 220701 | 2110 | 233 | 2408 | 2385 |
|
117 |
+
| italian | 59623 | 2173 | 240 | 1248 | 1262 |
|
118 |
+
| portuguese | 37533 | 2116 | 236 | 826 | 871 |
|
119 |
+
| polish | 25043 | 2173 | 238 | 512 | 520 |
|
120 |
+
|
121 |
+
|
122 |
+
|
123 |
+
## Dataset Creation
|
124 |
+
|
125 |
+
### Curation Rationale
|
126 |
+
|
127 |
+
[Needs More Information]
|
128 |
+
|
129 |
+
### Source Data
|
130 |
+
|
131 |
+
#### Initial Data Collection and Normalization
|
132 |
+
|
133 |
+
[Needs More Information]
|
134 |
+
|
135 |
+
#### Who are the source language producers?
|
136 |
+
|
137 |
+
[Needs More Information]
|
138 |
+
|
139 |
+
### Annotations
|
140 |
+
|
141 |
+
#### Annotation process
|
142 |
+
|
143 |
+
[Needs More Information]
|
144 |
+
|
145 |
+
#### Who are the annotators?
|
146 |
+
|
147 |
+
[Needs More Information]
|
148 |
+
|
149 |
+
### Personal and Sensitive Information
|
150 |
+
|
151 |
+
[Needs More Information]
|
152 |
+
|
153 |
+
## Considerations for Using the Data
|
154 |
+
|
155 |
+
### Social Impact of Dataset
|
156 |
+
|
157 |
+
[More Information Needed]
|
158 |
+
|
159 |
+
### Discussion of Biases
|
160 |
+
|
161 |
+
[More Information Needed]
|
162 |
+
|
163 |
+
### Other Known Limitations
|
164 |
+
|
165 |
+
[Needs More Information]
|
166 |
+
|
167 |
+
## Additional Information
|
168 |
+
|
169 |
+
### Dataset Curators
|
170 |
+
|
171 |
+
[Needs More Information]
|
172 |
+
|
173 |
+
### Licensing Information
|
174 |
+
|
175 |
+
CC BY 4.0
|
176 |
+
|
177 |
+
### Citation Information
|
178 |
+
|
179 |
+
```
|
180 |
+
@article{Pratap2020MLSAL,
|
181 |
+
title={MLS: A Large-Scale Multilingual Dataset for Speech Research},
|
182 |
+
author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},
|
183 |
+
journal={ArXiv},
|
184 |
+
year={2020},
|
185 |
+
volume={abs/2012.03411}
|
186 |
+
}
|
187 |
+
```
|
188 |
+
|
189 |
+
### Contributions
|
190 |
+
|
191 |
+
Thanks to [@patrickvonplaten](https://github.com/patrickvonplaten) for adding this dataset.
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"polish": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "polish", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 16136430, "num_examples": 25043, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1383232, "num_examples": 2173, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 145411, "num_examples": 238, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 318964, "num_examples": 512, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 332317, "num_examples": 520, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_polish.tar.gz": {"num_bytes": 6609569551, "checksum": "f911a08c4019891cc85b08995dc0f171e16d201037c02f69023beecef5b51d61"}}, "download_size": 6609569551, "post_processing_size": null, "dataset_size": 18316354, "size_in_bytes": 6627885905}, "german": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "german", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 277089334, "num_examples": 469942, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1325460, "num_examples": 2194, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 145998, "num_examples": 241, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 2160779, "num_examples": 3469, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 2131177, "num_examples": 3394, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_german.tar.gz": {"num_bytes": 122944886305, "checksum": "cea7912396a33cc599f86221f612a2eb1004b98ece3f60124710555eb5134b5c"}}, "download_size": 122944886305, "post_processing_size": null, "dataset_size": 282852748, "size_in_bytes": 123227739053}, "dutch": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "dutch", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 218648573, "num_examples": 374287, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1281951, "num_examples": 2153, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 141672, "num_examples": 234, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 1984165, "num_examples": 3095, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 1945428, "num_examples": 3075, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_dutch.tar.gz": {"num_bytes": 92158429530, "checksum": "f2c4b3deb5b918786c1819bc907adac8dd01413478bf3e51f3021aa66cc5a692"}}, "download_size": 92158429530, "post_processing_size": null, "dataset_size": 224001789, "size_in_bytes": 92382431319}, "french": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "french", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 162009691, "num_examples": 258213, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1347707, "num_examples": 2167, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 146699, "num_examples": 241, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 1482961, "num_examples": 2416, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 1539152, "num_examples": 2426, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_french.tar.gz": {"num_bytes": 64474642518, "checksum": "6e02cd822be42067a9b2b79dff65b4421295686471f16efde226baae4e7c7033"}}, "download_size": 64474642518, "post_processing_size": null, "dataset_size": 166526210, "size_in_bytes": 64641168728}, "spanish": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "spanish", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 136743162, "num_examples": 220701, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1288180, "num_examples": 2110, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 138734, "num_examples": 233, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 1463115, "num_examples": 2408, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 1464565, "num_examples": 2385, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_spanish.tar.gz": {"num_bytes": 53296894035, "checksum": "3cd4b1e8f40499d5a8b2834a1cc679a4673df5acb25bfd0ded1742ec451bc2f0"}}, "download_size": 53296894035, "post_processing_size": null, "dataset_size": 141097756, "size_in_bytes": 53437991791}, "italian": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "italian", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 36008104, "num_examples": 59623, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1325927, "num_examples": 2173, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 145006, "num_examples": 240, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 732210, "num_examples": 1248, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 746977, "num_examples": 1262, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_italian.tar.gz": {"num_bytes": 15395281399, "checksum": "cfb0a5cc22e6e25982c7ee235fd068c1756901ab9e1cbb97bf18f0583e771902"}}, "download_size": 15395281399, "post_processing_size": null, "dataset_size": 38958224, "size_in_bytes": 15434239623}, "portuguese": {"description": "Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.\n", "citation": "@article{Pratap2020MLSAL,\n title={MLS: A Large-Scale Multilingual Dataset for Speech Research},\n author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},\n journal={ArXiv},\n year={2020},\n volume={abs/2012.03411}\n}\n", "homepage": "http://www.openslr.org/94", "license": "", "features": {"file": {"dtype": "string", "id": null, "_type": "Value"}, "audio": {"sampling_rate": 16000, "mono": true, "id": null, "_type": "Audio"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "speaker_id": {"dtype": "int64", "id": null, "_type": "Value"}, "chapter_id": {"dtype": "int64", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "file", "output": "text"}, "task_templates": [{"task": "automatic-speech-recognition", "audio_file_path_column": "file", "transcription_column": "text"}], "builder_name": "multilingual_librispeech", "config_name": "portuguese", "version": {"version_str": "2.1.0", "description": "", "major": 2, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 23036487, "num_examples": 37533, "dataset_name": "multilingual_librispeech"}, "train.9h": {"name": "train.9h", "num_bytes": 1305698, "num_examples": 2116, "dataset_name": "multilingual_librispeech"}, "train.1h": {"name": "train.1h", "num_bytes": 143781, "num_examples": 236, "dataset_name": "multilingual_librispeech"}, "validation": {"name": "validation", "num_bytes": 512463, "num_examples": 826, "dataset_name": "multilingual_librispeech"}, "test": {"name": "test", "num_bytes": 549893, "num_examples": 871, "dataset_name": "multilingual_librispeech"}}, "download_checksums": {"https://dl.fbaipublicfiles.com/mls/mls_portuguese.tar.gz": {"num_bytes": 9982803818, "checksum": "89bed1e0ba5acb6f69da14e7063d4a3c3999d13c11af50ae652a3ced80f39164"}}, "download_size": 9982803818, "post_processing_size": null, "dataset_size": 25548322, "size_in_bytes": 10008352140}}
|
dummy/dutch/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:88217d917d483c4c1d167533ac9ddd0e2042ff20b039d036829260af05358940
|
3 |
+
size 4275
|
dummy/french/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:46e7613e299959b58aa0abdd872e630411f22e61f5e22831e4fcd452fdf26889
|
3 |
+
size 4301
|
dummy/german/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e8dbfdf95bc47f1c43181cbb3d8a150836e6e42b6ffd06ccb2e24845e3ecadf8
|
3 |
+
size 4301
|
dummy/italian/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5b5e16a1a99bf2329e7f2effa6dca6396f5eb9dabc6e70e49e9fd807a8e55a58
|
3 |
+
size 4327
|
dummy/polish/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:21ef19428fc13c4ab8380ce4ddd3b010a0d4b5d6c90aeb592360cc9da0890d57
|
3 |
+
size 4301
|
dummy/portuguese/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fa94004b97735c185cda2625de79aaa0ce3c0d856b152f58d36ee529f58dbdc3
|
3 |
+
size 4405
|
dummy/spanish/2.1.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:61bb7970f04f744623278e89193ce9a4bfaa841e3da22ff4db337fcd9ac00651
|
3 |
+
size 4327
|
multilingual_librispeech.py
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2021 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
"""Multilingual Librispeech automatic speech recognition dataset."""
|
18 |
+
|
19 |
+
|
20 |
+
import glob
|
21 |
+
import os
|
22 |
+
|
23 |
+
import datasets
|
24 |
+
from datasets.tasks import AutomaticSpeechRecognition
|
25 |
+
|
26 |
+
|
27 |
+
_CITATION = """\
|
28 |
+
@article{Pratap2020MLSAL,
|
29 |
+
title={MLS: A Large-Scale Multilingual Dataset for Speech Research},
|
30 |
+
author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},
|
31 |
+
journal={ArXiv},
|
32 |
+
year={2020},
|
33 |
+
volume={abs/2012.03411}
|
34 |
+
}
|
35 |
+
"""
|
36 |
+
|
37 |
+
_DESCRIPTION = """\
|
38 |
+
Multilingual LibriSpeech (MLS) dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish.
|
39 |
+
"""
|
40 |
+
|
41 |
+
_URL = "http://www.openslr.org/94"
|
42 |
+
_DL_URL_FORMAT = "https://dl.fbaipublicfiles.com/mls/mls_{}.tar.gz"
|
43 |
+
|
44 |
+
|
45 |
+
class MultilingualLibrispeechConfig(datasets.BuilderConfig):
|
46 |
+
"""BuilderConfig for MultilingualLibrispeech."""
|
47 |
+
|
48 |
+
def __init__(self, name, **kwargs):
|
49 |
+
"""
|
50 |
+
Args:
|
51 |
+
name: `string`, name of dataset config
|
52 |
+
**kwargs: keyword arguments forwarded to super.
|
53 |
+
"""
|
54 |
+
super(MultilingualLibrispeechConfig, self).__init__(
|
55 |
+
version=datasets.Version("2.1.0", ""), name=name, data_dir=_DL_URL_FORMAT.format(name), **kwargs
|
56 |
+
)
|
57 |
+
|
58 |
+
|
59 |
+
class MultilingualLibrispeech(datasets.GeneratorBasedBuilder):
|
60 |
+
"""Multilingual Librispeech dataset."""
|
61 |
+
|
62 |
+
BUILDER_CONFIGS = [
|
63 |
+
MultilingualLibrispeechConfig(name="german", description="German LibriSpeech dataset"),
|
64 |
+
MultilingualLibrispeechConfig(name="dutch", description="Dutch LibriSpeech dataset"),
|
65 |
+
MultilingualLibrispeechConfig(name="french", description="French LibriSpeech dataset"),
|
66 |
+
MultilingualLibrispeechConfig(name="spanish", description="Spanish LibriSpeech dataset"),
|
67 |
+
MultilingualLibrispeechConfig(name="italian", description="Italian LibriSpeech dataset"),
|
68 |
+
MultilingualLibrispeechConfig(name="portuguese", description="Portuguese LibriSpeech dataset"),
|
69 |
+
MultilingualLibrispeechConfig(name="polish", description="Polish LibriSpeech dataset"),
|
70 |
+
]
|
71 |
+
|
72 |
+
def _info(self):
|
73 |
+
return datasets.DatasetInfo(
|
74 |
+
description=_DESCRIPTION,
|
75 |
+
features=datasets.Features(
|
76 |
+
{
|
77 |
+
"file": datasets.Value("string"),
|
78 |
+
"audio": datasets.features.Audio(sampling_rate=16_000),
|
79 |
+
"text": datasets.Value("string"),
|
80 |
+
"speaker_id": datasets.Value("int64"),
|
81 |
+
"chapter_id": datasets.Value("int64"),
|
82 |
+
"id": datasets.Value("string"),
|
83 |
+
}
|
84 |
+
),
|
85 |
+
supervised_keys=("file", "text"),
|
86 |
+
homepage=_URL,
|
87 |
+
citation=_CITATION,
|
88 |
+
task_templates=[AutomaticSpeechRecognition(audio_file_path_column="file", transcription_column="text")],
|
89 |
+
)
|
90 |
+
|
91 |
+
def _split_generators(self, dl_manager):
|
92 |
+
archive_path = dl_manager.download_and_extract(self.config.data_dir)
|
93 |
+
data_path = os.path.join(archive_path, "mls_" + self.config.name)
|
94 |
+
|
95 |
+
train_splits = [
|
96 |
+
datasets.SplitGenerator(
|
97 |
+
name=datasets.Split.TRAIN, gen_kwargs={"data_dir": os.path.join(data_path, "train")}
|
98 |
+
),
|
99 |
+
datasets.SplitGenerator(
|
100 |
+
name="train.9h",
|
101 |
+
gen_kwargs={"data_dir": os.path.join(data_path, "train"), "sub_folder": "limited_supervision/9hr"},
|
102 |
+
),
|
103 |
+
datasets.SplitGenerator(
|
104 |
+
name="train.1h",
|
105 |
+
gen_kwargs={"data_dir": os.path.join(data_path, "train"), "sub_folder": "limited_supervision/1hr"},
|
106 |
+
),
|
107 |
+
]
|
108 |
+
|
109 |
+
return train_splits + [
|
110 |
+
datasets.SplitGenerator(
|
111 |
+
name=datasets.Split.VALIDATION, gen_kwargs={"data_dir": os.path.join(data_path, "dev")}
|
112 |
+
),
|
113 |
+
datasets.SplitGenerator(
|
114 |
+
name=datasets.Split.TEST, gen_kwargs={"data_dir": os.path.join(data_path, "test")}
|
115 |
+
),
|
116 |
+
]
|
117 |
+
|
118 |
+
def _generate_examples(self, data_dir, sub_folder=""):
|
119 |
+
"""Generate examples from a Multilingual LibriSpeech data dir."""
|
120 |
+
transcript_path = os.path.join(data_dir, "transcripts.txt")
|
121 |
+
key = 0
|
122 |
+
|
123 |
+
all_ids = None
|
124 |
+
if sub_folder != "":
|
125 |
+
sub_path = os.path.join(data_dir, sub_folder)
|
126 |
+
all_ids_paths = glob.glob(sub_path + "/*/*.txt") + glob.glob(sub_path + "/*.txt")
|
127 |
+
all_ids = []
|
128 |
+
for path in all_ids_paths:
|
129 |
+
with open(path, "r", encoding="utf-8") as f:
|
130 |
+
all_ids += [l.strip() for l in f.readlines()]
|
131 |
+
|
132 |
+
all_ids = set(all_ids)
|
133 |
+
|
134 |
+
with open(transcript_path, "r", encoding="utf-8") as f:
|
135 |
+
for line in f:
|
136 |
+
line = line.strip()
|
137 |
+
id_, transcript = line.split("\t")
|
138 |
+
|
139 |
+
if all_ids is not None and id_ not in all_ids:
|
140 |
+
# this only holds true for train.9h and train.1h
|
141 |
+
continue
|
142 |
+
|
143 |
+
audio_file = f"{id_}.flac"
|
144 |
+
speaker_id, chapter_id = [int(el) for el in id_.split("_")[:2]]
|
145 |
+
yield key, {
|
146 |
+
"id": id_,
|
147 |
+
"speaker_id": speaker_id,
|
148 |
+
"chapter_id": chapter_id,
|
149 |
+
"file": os.path.join(data_dir, "audio", str(speaker_id), str(chapter_id), audio_file),
|
150 |
+
"audio": os.path.join(data_dir, "audio", str(speaker_id), str(chapter_id), audio_file),
|
151 |
+
"text": transcript,
|
152 |
+
}
|
153 |
+
key += 1
|