Datasets:
Tasks:
Automatic Speech Recognition
Modalities:
Audio
Formats:
soundfolder
Languages:
Hindi
Size:
10K - 100K
License:
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
language:
|
| 3 |
- hi
|
| 4 |
license: cc0-1.0
|
| 5 |
-
pretty_name: Hindi ASR
|
| 6 |
task_categories:
|
| 7 |
- automatic-speech-recognition
|
| 8 |
size_categories:
|
| 9 |
-
-
|
| 10 |
tags:
|
| 11 |
- hindi
|
| 12 |
- indic
|
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
- speech
|
| 15 |
- common-voice
|
| 16 |
- whisper
|
| 17 |
-
-
|
| 18 |
annotations_creators:
|
| 19 |
- crowdsourced
|
| 20 |
language_details: hi-IN
|
|
@@ -22,74 +22,66 @@ source_datasets:
|
|
| 22 |
- mozilla-foundation/common_voice
|
| 23 |
---
|
| 24 |
|
| 25 |
-
# Hindi ASR
|
| 26 |
|
| 27 |
-
A
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
`test/audio/` folders additionally provide a curated **1,000-clip** subset under
|
| 35 |
-
sequential `cv_*` IDs (the "1k" in the name).
|
| 36 |
|
| 37 |
- **Language:** Hindi (`hi`), Devanagari script
|
| 38 |
- **Task:** Automatic Speech Recognition (speech → text)
|
| 39 |
- **Audio:** MP3, mono
|
| 40 |
-
- **Splits:** `train` (9,000
|
| 41 |
- **Source:** Mozilla Common Voice Hindi (crowd-sourced read speech)
|
| 42 |
- **License:** CC0-1.0 (public domain), inherited from Common Voice
|
| 43 |
|
| 44 |
## Dataset structure
|
| 45 |
|
| 46 |
-
Each split
|
| 47 |
-
|
| 48 |
-
holds the same kind of clips under sequential `cv_NNNNNN.mp3` identifiers.
|
| 49 |
|
| 50 |
```
|
| 51 |
-
|
| 52 |
├── train/
|
| 53 |
-
│ ├── clips/
|
| 54 |
-
│
|
| 55 |
-
│ └── metadata.tsv # file_name, text (transcripts for the clips/)
|
| 56 |
└── test/
|
| 57 |
-
├── clips/
|
| 58 |
-
|
| 59 |
-
├── metadata.csv # file_name, text (transcripts for the clips/)
|
| 60 |
-
└── metadata.tsv # path, text (transcripts for the audio/ files)
|
| 61 |
```
|
| 62 |
|
| 63 |
### Data fields
|
| 64 |
|
| 65 |
-
- **`file_name`**
|
| 66 |
- **`text`** (`string`): the ground-truth Hindi transcription in Devanagari.
|
| 67 |
-
- **`audio`** (`Audio`):
|
| 68 |
-
🤗 `datasets` `AudioFolder` builder.
|
| 69 |
|
| 70 |
### Data instance
|
| 71 |
|
| 72 |
```json
|
| 73 |
{
|
| 74 |
-
"file_name": "
|
| 75 |
-
"text": "
|
| 76 |
}
|
| 77 |
```
|
| 78 |
|
| 79 |
### Splits
|
| 80 |
|
| 81 |
-
| Split |
|
| 82 |
-
| ----- | ----
|
| 83 |
-
| train | 9,000
|
| 84 |
-
| test | 1,000
|
| 85 |
-
|
| 86 |
-
Every row in each split's metadata has a matching audio file in `clips/`.
|
| 87 |
|
| 88 |
## Usage
|
| 89 |
|
| 90 |
-
The metadata is tab-separated and its `file_name` column is relative to the
|
| 91 |
`clips/` folder, so the most reliable way to load audio + text together is to
|
| 92 |
-
download the repo and join the paths
|
| 93 |
|
| 94 |
```python
|
| 95 |
import os
|
|
@@ -97,18 +89,20 @@ import pandas as pd
|
|
| 97 |
from huggingface_hub import snapshot_download
|
| 98 |
from datasets import Dataset, Audio
|
| 99 |
|
| 100 |
-
root = snapshot_download("dhruvkys/
|
| 101 |
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
df =
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
)
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
-
|
| 110 |
-
print(
|
| 111 |
-
print(ds[0]["audio"]["array"].shape, ds[0]["audio"]["sampling_rate"])
|
| 112 |
```
|
| 113 |
|
| 114 |
Just need the transcripts? Read the metadata directly:
|
|
@@ -117,7 +111,7 @@ Just need the transcripts? Read the metadata directly:
|
|
| 117 |
import pandas as pd
|
| 118 |
|
| 119 |
df = pd.read_csv(
|
| 120 |
-
"hf://datasets/dhruvkys/
|
| 121 |
sep="\t", # metadata is tab-separated
|
| 122 |
)
|
| 123 |
print(df.head())
|
|
@@ -133,8 +127,8 @@ asr = pipeline("automatic-speech-recognition",
|
|
| 133 |
model="openai/whisper-small", generate_kwargs={"language": "hi"})
|
| 134 |
wer = evaluate.load("wer")
|
| 135 |
|
| 136 |
-
preds = [asr(x["audio"])["text"] for x in
|
| 137 |
-
refs = [x["text"] for x in
|
| 138 |
print("WER:", wer.compute(predictions=preds, references=refs))
|
| 139 |
```
|
| 140 |
|
|
@@ -142,8 +136,8 @@ print("WER:", wer.compute(predictions=preds, references=refs))
|
|
| 142 |
|
| 143 |
Audio and transcriptions originate from the **Mozilla Common Voice** Hindi
|
| 144 |
corpus — sentences read aloud and contributed by volunteers, then validated by
|
| 145 |
-
community review. This dataset is a curated
|
| 146 |
-
|
| 147 |
|
| 148 |
## Preprocessing recommendations
|
| 149 |
|
|
@@ -179,12 +173,11 @@ If you use this dataset, please cite Mozilla Common Voice:
|
|
| 179 |
|
| 180 |
## Known limitations
|
| 181 |
|
| 182 |
-
- **
|
| 183 |
-
for
|
| 184 |
- **Domain skew.** Many sentences are news headlines, so vocabulary leans toward
|
| 185 |
named entities, politics, and current-affairs terms.
|
| 186 |
-
- **
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
-
|
| 190 |
-
`metadata.csv`. Pass `sep="\t"` when reading them (see usage above).
|
|
|
|
| 2 |
language:
|
| 3 |
- hi
|
| 4 |
license: cc0-1.0
|
| 5 |
+
pretty_name: Hindi ASR 11k (Common Voice subset)
|
| 6 |
task_categories:
|
| 7 |
- automatic-speech-recognition
|
| 8 |
size_categories:
|
| 9 |
+
- 10K<n<100K
|
| 10 |
tags:
|
| 11 |
- hindi
|
| 12 |
- indic
|
|
|
|
| 14 |
- speech
|
| 15 |
- common-voice
|
| 16 |
- whisper
|
| 17 |
+
- finetune
|
| 18 |
annotations_creators:
|
| 19 |
- crowdsourced
|
| 20 |
language_details: hi-IN
|
|
|
|
| 22 |
- mozilla-foundation/common_voice
|
| 23 |
---
|
| 24 |
|
| 25 |
+
# Hindi ASR 11k
|
| 26 |
|
| 27 |
+
A **Hindi automatic speech recognition (ASR)** dataset of ~10,000 short read-speech
|
| 28 |
+
utterances with ground-truth Devanagari transcriptions, derived from
|
| 29 |
+
**[Mozilla Common Voice](https://commonvoice.mozilla.org) (Hindi)**. It is a
|
| 30 |
+
convenient, dependency-light corpus for **fine-tuning** and **WER benchmarking** of
|
| 31 |
+
[Whisper](https://github.com/openai/whisper) and other multilingual / Indic ASR
|
| 32 |
+
models — large enough to move the needle when fine-tuning, small enough to iterate
|
| 33 |
+
on a single GPU.
|
|
|
|
|
|
|
| 34 |
|
| 35 |
- **Language:** Hindi (`hi`), Devanagari script
|
| 36 |
- **Task:** Automatic Speech Recognition (speech → text)
|
| 37 |
- **Audio:** MP3, mono
|
| 38 |
+
- **Splits:** `train` (9,000 clips) / `test` (1,000 clips)
|
| 39 |
- **Source:** Mozilla Common Voice Hindi (crowd-sourced read speech)
|
| 40 |
- **License:** CC0-1.0 (public domain), inherited from Common Voice
|
| 41 |
|
| 42 |
## Dataset structure
|
| 43 |
|
| 44 |
+
Each split contains an audio folder and a metadata file that maps every clip to its
|
| 45 |
+
transcription. Every metadata row has a matching audio file.
|
|
|
|
| 46 |
|
| 47 |
```
|
| 48 |
+
11k-asr/
|
| 49 |
├── train/
|
| 50 |
+
│ ├── clips/ # 9,000 common_voice_hi_*.mp3
|
| 51 |
+
│ └── metadata.tsv # file_name, text
|
|
|
|
| 52 |
└── test/
|
| 53 |
+
├── clips/ # 1,000 common_voice_hi_*.mp3
|
| 54 |
+
└── metadata.tsv # file_name, text
|
|
|
|
|
|
|
| 55 |
```
|
| 56 |
|
| 57 |
### Data fields
|
| 58 |
|
| 59 |
+
- **`file_name`** (`string`): audio filename, relative to the split's `clips/` folder.
|
| 60 |
- **`text`** (`string`): the ground-truth Hindi transcription in Devanagari.
|
| 61 |
+
- **`audio`** (`Audio`): decoded waveform + sampling rate, once loaded (see below).
|
|
|
|
| 62 |
|
| 63 |
### Data instance
|
| 64 |
|
| 65 |
```json
|
| 66 |
{
|
| 67 |
+
"file_name": "common_voice_hi_27545949.mp3",
|
| 68 |
+
"text": "जिम मेरे घर में ठहरा था।"
|
| 69 |
}
|
| 70 |
```
|
| 71 |
|
| 72 |
### Splits
|
| 73 |
|
| 74 |
+
| Split | Clips |
|
| 75 |
+
| ----- | ----: |
|
| 76 |
+
| train | 9,000 |
|
| 77 |
+
| test | 1,000 |
|
| 78 |
+
| **total** | **10,000** |
|
|
|
|
| 79 |
|
| 80 |
## Usage
|
| 81 |
|
| 82 |
+
The metadata is **tab-separated** and its `file_name` column is relative to the
|
| 83 |
`clips/` folder, so the most reliable way to load audio + text together is to
|
| 84 |
+
download the repo and join the paths:
|
| 85 |
|
| 86 |
```python
|
| 87 |
import os
|
|
|
|
| 89 |
from huggingface_hub import snapshot_download
|
| 90 |
from datasets import Dataset, Audio
|
| 91 |
|
| 92 |
+
root = snapshot_download("dhruvkys/11k-asr", repo_type="dataset")
|
| 93 |
|
| 94 |
+
def load_split(split):
|
| 95 |
+
df = pd.read_csv(os.path.join(root, split, "metadata.tsv"), sep="\t")
|
| 96 |
+
df["audio"] = df["file_name"].apply(
|
| 97 |
+
lambda f: os.path.join(root, split, "clips", f)
|
| 98 |
+
)
|
| 99 |
+
return Dataset.from_pandas(df).cast_column("audio", Audio(sampling_rate=16_000))
|
| 100 |
+
|
| 101 |
+
train = load_split("train")
|
| 102 |
+
test = load_split("test")
|
| 103 |
|
| 104 |
+
print(train[0]["text"])
|
| 105 |
+
print(train[0]["audio"]["array"].shape, train[0]["audio"]["sampling_rate"])
|
|
|
|
| 106 |
```
|
| 107 |
|
| 108 |
Just need the transcripts? Read the metadata directly:
|
|
|
|
| 111 |
import pandas as pd
|
| 112 |
|
| 113 |
df = pd.read_csv(
|
| 114 |
+
"hf://datasets/dhruvkys/11k-asr/train/metadata.tsv",
|
| 115 |
sep="\t", # metadata is tab-separated
|
| 116 |
)
|
| 117 |
print(df.head())
|
|
|
|
| 127 |
model="openai/whisper-small", generate_kwargs={"language": "hi"})
|
| 128 |
wer = evaluate.load("wer")
|
| 129 |
|
| 130 |
+
preds = [asr(x["audio"])["text"] for x in test]
|
| 131 |
+
refs = [x["text"] for x in test]
|
| 132 |
print("WER:", wer.compute(predictions=preds, references=refs))
|
| 133 |
```
|
| 134 |
|
|
|
|
| 136 |
|
| 137 |
Audio and transcriptions originate from the **Mozilla Common Voice** Hindi
|
| 138 |
corpus — sentences read aloud and contributed by volunteers, then validated by
|
| 139 |
+
community review. This dataset is a curated subset repackaged for convenient
|
| 140 |
+
fine-tuning and evaluation; no new recordings were made.
|
| 141 |
|
| 142 |
## Preprocessing recommendations
|
| 143 |
|
|
|
|
| 173 |
|
| 174 |
## Known limitations
|
| 175 |
|
| 176 |
+
- **Modest scale.** ~10k clips — strong for fine-tuning and benchmarking, but not a
|
| 177 |
+
substitute for the full Common Voice corpus when training from scratch.
|
| 178 |
- **Domain skew.** Many sentences are news headlines, so vocabulary leans toward
|
| 179 |
named entities, politics, and current-affairs terms.
|
| 180 |
+
- **Metadata format.** Metadata files are **tab-separated** (`.tsv`); pass
|
| 181 |
+
`sep="\t"` when reading them. Because `file_name` is not prefixed with `clips/`,
|
| 182 |
+
the plain `audiofolder` builder will not auto-attach transcripts — use the
|
| 183 |
+
snapshot-based loader above.
|
|
|