Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,61 @@
|
|
1 |
---
|
2 |
license: mpl-2.0
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mpl-2.0
|
3 |
+
language:
|
4 |
+
- pt
|
5 |
---
|
6 |
+
# Dataset Card for Common Voice Corpus 15.0
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of the dataset. -->
|
9 |
+
|
10 |
+
This dataset is an unofficial converted version of the Mozilla Common Voice Corpus 15. It currently contains the following languages: Portuguese
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
## How to use
|
15 |
+
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.
|
16 |
+
|
17 |
+
For example, to download the Portuguese config, simply specify the corresponding language config name (i.e., "pt" for Portuguese):
|
18 |
+
```
|
19 |
+
from datasets import load_dataset
|
20 |
+
|
21 |
+
cv_15 = load_dataset("fsicoli/common_voice_15_0", "pt", split="train")
|
22 |
+
```
|
23 |
+
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.
|
24 |
+
|
25 |
+
```
|
26 |
+
from datasets import load_dataset
|
27 |
+
|
28 |
+
cv_15 = load_dataset("fsicoli/common_voice_15_0", "pt", split="train", streaming=True)
|
29 |
+
|
30 |
+
print(next(iter(cv_15)))
|
31 |
+
```
|
32 |
+
|
33 |
+
Bonus: create a PyTorch dataloader directly with your own datasets (local/streamed).
|
34 |
+
|
35 |
+
### Local
|
36 |
+
```
|
37 |
+
from datasets import load_dataset
|
38 |
+
from torch.utils.data.sampler import BatchSampler, RandomSampler
|
39 |
+
|
40 |
+
cv_15 = load_dataset("fsicoli/common_voice_15_0", "pt", split="train")
|
41 |
+
batch_sampler = BatchSampler(RandomSampler(cv_15), batch_size=32, drop_last=False)
|
42 |
+
dataloader = DataLoader(cv_15, batch_sampler=batch_sampler)
|
43 |
+
```
|
44 |
+
|
45 |
+
### Streaming
|
46 |
+
```
|
47 |
+
from datasets import load_dataset
|
48 |
+
from torch.utils.data import DataLoader
|
49 |
+
|
50 |
+
cv_15 = load_dataset("fsicoli/common_voice_15_0", "pt", split="train")
|
51 |
+
dataloader = DataLoader(cv_15, batch_size=32)
|
52 |
+
```
|
53 |
+
|
54 |
+
To find out more about loading and preparing audio datasets, head over to hf.co/blog/audio-datasets.
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
### Dataset Structure
|
59 |
+
Data Instances
|
60 |
+
A typical data point comprises the path to the audio file and its sentence. Additional fields include accent, age, client_id, up_votes, down_votes, gender, locale and segment.
|
61 |
+
|