dhruvkys commited on
Commit
dc161f4
·
verified ·
1 Parent(s): a6994c4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -60
README.md CHANGED
@@ -2,11 +2,11 @@
2
  language:
3
  - hi
4
  license: cc0-1.0
5
- pretty_name: Hindi ASR 1k (Common Voice subset)
6
  task_categories:
7
  - automatic-speech-recognition
8
  size_categories:
9
- - 1K<n<10K
10
  tags:
11
  - hindi
12
  - indic
@@ -14,7 +14,7 @@ tags:
14
  - speech
15
  - common-voice
16
  - whisper
17
- - groundtruth
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 1k
26
 
27
- A ready-to-use **Hindi automatic speech recognition (ASR)** dataset: ~10,000
28
- short read-speech utterances with ground-truth Devanagari transcriptions, derived
29
- from **[Mozilla Common Voice](https://commonvoice.mozilla.org) (Hindi)**. It is
30
- sized for quick fine-tuning experiments and for benchmarking/word-error-rate (WER)
31
- evaluation of models such as [Whisper](https://github.com/openai/whisper) and
32
- other multilingual/Indic ASR systems — small enough to iterate on a single GPU,
33
- while still being a real, human-spoken corpus. The `train/audio/` and
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 transcribed clips) / `test` (1,000 transcribed clips)
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 ships audio under `clips/` (original Common Voice filenames) with a
47
- metadata file mapping every clip to its transcript. A parallel `audio/` folder
48
- holds the same kind of clips under sequential `cv_NNNNNN.mp3` identifiers.
49
 
50
  ```
51
- hi-asr-1k/
52
  ├── train/
53
- │ ├── clips/ # 9,000 common_voice_hi_*.mp3
54
- │ ├── audio/ # 800 cv_*.mp3 (sequential IDs)
55
- │ └── metadata.tsv # file_name, text (transcripts for the clips/)
56
  └── test/
57
- ├── clips/ # 1,000 common_voice_hi_*.mp3
58
- ├── audio/ # 200 cv_*.mp3 (sequential IDs)
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`** / **`path`** (`string`): relative path to the audio clip.
66
  - **`text`** (`string`): the ground-truth Hindi transcription in Devanagari.
67
- - **`audio`** (`Audio`): the decoded waveform + sampling rate, when loaded via the
68
- 🤗 `datasets` `AudioFolder` builder.
69
 
70
  ### Data instance
71
 
72
  ```json
73
  {
74
- "file_name": "common_voice_hi_24663092.mp3",
75
- "text": "उन्हे अपने अकलमंद बेटे पर नाज़ है।"
76
  }
77
  ```
78
 
79
  ### Splits
80
 
81
- | Split | Transcribed clips (`clips/`) | Extra audio (`audio/`) |
82
- | ----- | ---------------------------: | ---------------------: |
83
- | train | 9,000 | 800 |
84
- | test | 1,000 | 200 |
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 yourself:
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/hi-asr-1k", repo_type="dataset")
101
 
102
- split = "train" # or "test"
103
- meta = "metadata.tsv" if split == "train" else "metadata.csv" # both are TSV-formatted
104
- df = pd.read_csv(os.path.join(root, split, meta), sep="\t")
105
- df["audio"] = df["file_name"].apply(
106
- lambda f: os.path.join(root, split, "clips", f)
107
- )
 
 
 
108
 
109
- ds = Dataset.from_pandas(df).cast_column("audio", Audio(sampling_rate=16_000))
110
- print(ds[0]["text"])
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/hi-asr-1k/test/metadata.csv",
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 ds]
137
- refs = [x["text"] for x in ds]
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 ~1k-per-split subset repackaged for
146
- convenient fine-tuning and evaluation; no new recordings were made.
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
- - **Small scale.** ~1k clips per split — good for prototyping and benchmarking, not
183
- for training a production ASR model from scratch.
184
  - **Domain skew.** Many sentences are news headlines, so vocabulary leans toward
185
  named entities, politics, and current-affairs terms.
186
- - **Two naming schemes.** `clips/` uses original Common Voice filenames; `audio/`
187
- uses sequential `cv_*` IDs. The `train/audio/` clips do not ship a dedicated
188
- transcript file (only `test/audio/` has `test/metadata.tsv`).
189
- - **Metadata format.** The metadata files are **tab-separated**, even the one named
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.