Seosnaps commited on
Commit
ba6e32a
1 Parent(s): 0bd066b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +398 -3
README.md CHANGED
@@ -1,3 +1,398 @@
1
- ---
2
- license: cc0-1.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Common Voice Corpus 16
3
+ annotations_creators:
4
+ - crowdsourced
5
+ language_creators:
6
+ - crowdsourced
7
+ language:
8
+ - ab
9
+ - af
10
+ - am
11
+ - ar
12
+ - as
13
+ - ast
14
+ - az
15
+ - ba
16
+ - bas
17
+ - be
18
+ - bg
19
+ - bn
20
+ - br
21
+ - ca
22
+ - ckb
23
+ - cnh
24
+ - cs
25
+ - cv
26
+ - cy
27
+ - da
28
+ - de
29
+ - dv
30
+ - dyu
31
+ - el
32
+ - en
33
+ - eo
34
+ - es
35
+ - et
36
+ - eu
37
+ - fa
38
+ - fi
39
+ - fr
40
+ - fy
41
+ - ga
42
+ - gl
43
+ - gn
44
+ - ha
45
+ - he
46
+ - hi
47
+ - hsb
48
+ - hu
49
+ - hy
50
+ - ia
51
+ - id
52
+ - ig
53
+ - is
54
+ - it
55
+ - ja
56
+ - ka
57
+ - kab
58
+ - kk
59
+ - kmr
60
+ - ko
61
+ - ky
62
+ - lg
63
+ - lij
64
+ - lo
65
+ - lt
66
+ - ltg
67
+ - lv
68
+ - mdf
69
+ - mhr
70
+ - mk
71
+ - ml
72
+ - mn
73
+ - mr
74
+ - mrj
75
+ - mt
76
+ - myv
77
+ - nan
78
+ - ne
79
+ - nhi
80
+ - nl
81
+ - nn
82
+ - oc
83
+ - or
84
+ - os
85
+ - pa
86
+ - pl
87
+ - ps
88
+ - pt
89
+ - quy
90
+ - rm
91
+ - ro
92
+ - ru
93
+ - rw
94
+ - sah
95
+ - sat
96
+ - sc
97
+ - sk
98
+ - skr
99
+ - sl
100
+ - sq
101
+ - sr
102
+ - sv
103
+ - sw
104
+ - ta
105
+ - te
106
+ - th
107
+ - ti
108
+ - tig
109
+ - tk
110
+ - tok
111
+ - tr
112
+ - tt
113
+ - tw
114
+ - ug
115
+ - uk
116
+ - ur
117
+ - uz
118
+ - vi
119
+ - vot
120
+ - yi
121
+ - yo
122
+ - yue
123
+ - zgh
124
+ - zh
125
+ language_bcp47:
126
+ - zh-CN
127
+ - zh-HK
128
+ - zh-TW
129
+ - sv-SE
130
+ - rm-sursilv
131
+ - rm-vallader
132
+ - pa-IN
133
+ - nn-NO
134
+ - ne-NP
135
+ - nan-tw
136
+ - hy-AM
137
+ - ga-IE
138
+ - fy-NL
139
+ license:
140
+ - cc0-1.0
141
+ multilinguality:
142
+ - multilingual
143
+ paperswithcode_id: common-voice
144
+ extra_gated_prompt: "By clicking on “Access repository” below, you also agree to not attempt to determine the identity of speakers in the Common Voice dataset."
145
+ ---
146
+ # Dataset Card for Common Voice Corpus 16
147
+
148
+ ## Table of Contents
149
+ - [Dataset Description](#dataset-description)
150
+ - [Dataset Summary](#dataset-summary)
151
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
152
+ - [Languages](#languages)
153
+ - [Dataset Structure](#dataset-structure)
154
+ - [Data Instances](#data-instances)
155
+ - [Data Fields](#data-fields)
156
+ - [Data Splits](#data-splits)
157
+ - [Dataset Creation](#dataset-creation)
158
+ - [Curation Rationale](#curation-rationale)
159
+ - [Source Data](#source-data)
160
+ - [Annotations](#annotations)
161
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
162
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
163
+ - [Social Impact of Dataset](#social-impact-of-dataset)
164
+ - [Discussion of Biases](#discussion-of-biases)
165
+ - [Other Known Limitations](#other-known-limitations)
166
+ - [Additional Information](#additional-information)
167
+ - [Dataset Curators](#dataset-curators)
168
+ - [Licensing Information](#licensing-information)
169
+ - [Citation Information](#citation-information)
170
+ - [Contributions](#contributions)
171
+
172
+ ## Dataset Description
173
+
174
+ - **Homepage:** https://commonvoice.mozilla.org/en/datasets
175
+ - **Repository:** https://github.com/common-voice/common-voice
176
+ - **Paper:** https://arxiv.org/abs/1912.06670
177
+ - **Leaderboard:** https://paperswithcode.com/dataset/common-voice
178
+ - **Point of Contact:** [Vaibhav Srivastav](mailto:vaibhav@huggingface.co)
179
+
180
+ ### Dataset Summary
181
+
182
+ The Common Voice dataset consists of a unique MP3 and corresponding text file.
183
+ Many of the 30328 recorded hours in the dataset also include demographic metadata like age, sex, and accent
184
+ that can help improve the accuracy of speech recognition engines.
185
+
186
+ The dataset currently consists of 19673 validated hours in 120 languages, but more voices and languages are always added.
187
+ Take a look at the [Languages](https://commonvoice.mozilla.org/en/languages) page to request a language or start contributing.
188
+
189
+ ### Languages
190
+
191
+ ```
192
+ Abkhaz, Afrikaans, Albanian, Amharic, Arabic, Armenian, Assamese, Asturian, Azerbaijani, Basaa, Bashkir, Basque, Belarusian, Bengali, Breton, Bulgarian, Cantonese, Catalan, Central Kurdish, Chinese (China), Chinese (Hong Kong), Chinese (Taiwan), Chuvash, Czech, Danish, Dhivehi, Dioula, Dutch, English, Erzya, Esperanto, Estonian, Finnish, French, Frisian, Galician, Georgian, German, Greek, Guarani, Hakha Chin, Hausa, Hebrew, Hill Mari, Hindi, Hungarian, Icelandic, Igbo, Indonesian, Interlingua, Irish, Italian, Japanese, Kabyle, Kazakh, Kinyarwanda, Korean, Kurmanji Kurdish, Kyrgyz, Lao, Latgalian, Latvian, Ligurian, Lithuanian, Luganda, Macedonian, Malayalam, Maltese, Marathi, Meadow Mari, Moksha, Mongolian, Nepali, Norwegian Nynorsk, Occitan, Odia, Ossetian, Pashto, Persian, Polish, Portuguese, Punjabi, Quechua Chanka, Romanian, Romansh Sursilvan, Romansh Vallader, Russian, Sakha, Santali (Ol Chiki), Saraiki, Sardinian, Serbian, Slovak, Slovenian, Sorbian, Upper, Spanish, Swahili, Swedish, Taiwanese (Minnan), Tamazight, Tamil, Tatar, Telugu, Thai, Tigre, Tigrinya, Toki Pona, Turkish, Turkmen, Twi, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Votic, Welsh, Western Sierra Puebla Nahuatl, Yiddish, Yoruba
193
+ ```
194
+
195
+ ## How to use
196
+
197
+ The `datasets` library allows you to load and pre-process your dataset in pure Python, at scale. The dataset can be downloaded and prepared in one call to your local drive by using the `load_dataset` function.
198
+
199
+ For example, to download the Hindi config, simply specify the corresponding language config name (i.e., "hi" for Hindi):
200
+ ```python
201
+ from datasets import load_dataset
202
+ cv_16 = load_dataset("mozilla-foundation/common_voice_16_0", "hi", split="train")
203
+ ```
204
+
205
+ Using the datasets library, you can also stream the dataset on-the-fly by adding a `streaming=True` argument to the `load_dataset` function call. Loading a dataset in streaming mode loads individual samples of the dataset at a time, rather than downloading the entire dataset to disk.
206
+ ```python
207
+ from datasets import load_dataset
208
+ cv_16 = load_dataset("mozilla-foundation/common_voice_16_0", "hi", split="train", streaming=True)
209
+ print(next(iter(cv_16)))
210
+ ```
211
+
212
+ *Bonus*: create a [PyTorch dataloader](https://huggingface.co/docs/datasets/use_with_pytorch) directly with your own datasets (local/streamed).
213
+
214
+ ### Local
215
+
216
+ ```python
217
+ from datasets import load_dataset
218
+ from torch.utils.data.sampler import BatchSampler, RandomSampler
219
+ cv_16 = load_dataset("mozilla-foundation/common_voice_16_0", "hi", split="train")
220
+ batch_sampler = BatchSampler(RandomSampler(cv_16), batch_size=32, drop_last=False)
221
+ dataloader = DataLoader(cv_16, batch_sampler=batch_sampler)
222
+ ```
223
+
224
+ ### Streaming
225
+
226
+ ```python
227
+ from datasets import load_dataset
228
+ from torch.utils.data import DataLoader
229
+ cv_16 = load_dataset("mozilla-foundation/common_voice_16_0", "hi", split="train")
230
+ dataloader = DataLoader(cv_16, batch_size=32)
231
+ ```
232
+
233
+ To find out more about loading and preparing audio datasets, head over to [hf.co/blog/audio-datasets](https://huggingface.co/blog/audio-datasets).
234
+
235
+ ### Example scripts
236
+
237
+ Train your own CTC or Seq2Seq Automatic Speech Recognition models on Common Voice 16 with `transformers` - [here](https://github.com/huggingface/transformers/tree/main/examples/pytorch/speech-recognition).
238
+
239
+ ## Dataset Structure
240
+
241
+ ### Data Instances
242
+
243
+ A typical data point comprises the `path` to the audio file and its `sentence`.
244
+ Additional fields include `accent`, `age`, `client_id`, `up_votes`, `down_votes`, `gender`, `locale` and `segment`.
245
+
246
+ ```python
247
+ {
248
+ 'client_id': 'd59478fbc1ee646a28a3c652a119379939123784d99131b865a89f8b21c81f69276c48bd574b81267d9d1a77b83b43e6d475a6cfc79c232ddbca946ae9c7afc5',
249
+ 'path': 'et/clips/common_voice_et_18318995.mp3',
250
+ 'audio': {
251
+ 'path': 'et/clips/common_voice_et_18318995.mp3',
252
+ 'array': array([-0.00048828, -0.00018311, -0.00137329, ..., 0.00079346, 0.00091553, 0.00085449], dtype=float32),
253
+ 'sampling_rate': 48000
254
+ },
255
+ 'sentence': 'Tasub kokku saada inimestega, keda tunned juba ammust ajast saati.',
256
+ 'up_votes': 2,
257
+ 'down_votes': 0,
258
+ 'age': 'twenties',
259
+ 'gender': 'male',
260
+ 'accent': '',
261
+ 'locale': 'et',
262
+ 'segment': ''
263
+ }
264
+ ```
265
+
266
+ ### Data Fields
267
+
268
+ `client_id` (`string`): An id for which client (voice) made the recording
269
+
270
+ `path` (`string`): The path to the audio file
271
+
272
+ `audio` (`dict`): 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]`.
273
+
274
+ `sentence` (`string`): The sentence the user was prompted to speak
275
+
276
+ `up_votes` (`int64`): How many upvotes the audio file has received from reviewers
277
+
278
+ `down_votes` (`int64`): How many downvotes the audio file has received from reviewers
279
+
280
+ `age` (`string`): The age of the speaker (e.g. `teens`, `twenties`, `fifties`)
281
+
282
+ `gender` (`string`): The gender of the speaker
283
+
284
+ `accent` (`string`): Accent of the speaker
285
+
286
+ `locale` (`string`): The locale of the speaker
287
+
288
+ `segment` (`string`): Usually an empty field
289
+
290
+ ### Data Splits
291
+
292
+ The speech material has been subdivided into portions for dev, train, test, validated, invalidated, reported and other.
293
+
294
+ The validated data is data that has been validated with reviewers and received upvotes that the data is of high quality.
295
+
296
+ The invalidated data is data has been invalidated by reviewers
297
+ and received downvotes indicating that the data is of low quality.
298
+
299
+ The reported data is data that has been reported, for different reasons.
300
+
301
+ The other data is data that has not yet been reviewed.
302
+
303
+ The dev, test, train are all data that has been reviewed, deemed of high quality and split into dev, test and train.
304
+
305
+ ## Data Preprocessing Recommended by Hugging Face
306
+
307
+ The following are data preprocessing steps advised by the Hugging Face team. They are accompanied by an example code snippet that shows how to put them to practice.
308
+
309
+ Many examples in this dataset have trailing quotations marks, e.g _“the cat sat on the mat.“_. These trailing quotation marks do not change the actual meaning of the sentence, and it is near impossible to infer whether a sentence is a quotation or not a quotation from audio data alone. In these cases, it is advised to strip the quotation marks, leaving: _the cat sat on the mat_.
310
+
311
+ In addition, the majority of training sentences end in punctuation ( . or ? or ! ), whereas just a small proportion do not. In the dev set, **almost all** sentences end in punctuation. Thus, it is recommended to append a full-stop ( . ) to the end of the small number of training examples that do not end in punctuation.
312
+
313
+ ```python
314
+ from datasets import load_dataset
315
+ ds = load_dataset("mozilla-foundation/common_voice_16_0", "en", use_auth_token=True)
316
+ def prepare_dataset(batch):
317
+ """Function to preprocess the dataset with the .map method"""
318
+ transcription = batch["sentence"]
319
+
320
+ if transcription.startswith('"') and transcription.endswith('"'):
321
+ # we can remove trailing quotation marks as they do not affect the transcription
322
+ transcription = transcription[1:-1]
323
+
324
+ if transcription[-1] not in [".", "?", "!"]:
325
+ # append a full-stop to sentences that do not end in punctuation
326
+ transcription = transcription + "."
327
+
328
+ batch["sentence"] = transcription
329
+
330
+ return batch
331
+ ds = ds.map(prepare_dataset, desc="preprocess dataset")
332
+ ```
333
+
334
+ ## Dataset Creation
335
+
336
+ ### Curation Rationale
337
+
338
+ [Needs More Information]
339
+
340
+ ### Source Data
341
+
342
+ #### Initial Data Collection and Normalization
343
+
344
+ [Needs More Information]
345
+
346
+ #### Who are the source language producers?
347
+
348
+ [Needs More Information]
349
+
350
+ ### Annotations
351
+
352
+ #### Annotation process
353
+
354
+ [Needs More Information]
355
+
356
+ #### Who are the annotators?
357
+
358
+ [Needs More Information]
359
+
360
+ ### Personal and Sensitive Information
361
+
362
+ The dataset consists of people who have donated their voice online. You agree to not attempt to determine the identity of speakers in the Common Voice dataset.
363
+
364
+ ## Considerations for Using the Data
365
+
366
+ ### Social Impact of Dataset
367
+
368
+ The dataset consists of people who have donated their voice online. You agree to not attempt to determine the identity of speakers in the Common Voice dataset.
369
+
370
+ ### Discussion of Biases
371
+
372
+ [More Information Needed]
373
+
374
+ ### Other Known Limitations
375
+
376
+ [More Information Needed]
377
+
378
+ ## Additional Information
379
+
380
+ ### Dataset Curators
381
+
382
+ [More Information Needed]
383
+
384
+ ### Licensing Information
385
+
386
+ Public Domain, [CC-0](https://creativecommons.org/share-your-work/public-domain/cc0/)
387
+
388
+ ### Citation Information
389
+
390
+ ```
391
+ @inproceedings{commonvoice:2020,
392
+ author = {Ardila, R. and Branson, M. and Davis, K. and Henretty, M. and Kohler, M. and Meyer, J. and Morais, R. and Saunders, L. and Tyers, F. M. and Weber, G.},
393
+ title = {Common Voice: A Massively-Multilingual Speech Corpus},
394
+ booktitle = {Proceedings of the 12th Conference on Language Resources and Evaluation (LREC 2020)},
395
+ pages = {4211--4215},
396
+ year = 2020
397
+ }
398
+ ```