huseinzolkepliscicom commited on
Commit
687087b
·
verified ·
1 Parent(s): 94d7b27

Add dataset card + viewer config

Browse files
Files changed (1) hide show
  1. README.md +217 -0
README.md ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: YouTube Cantonese (Emilia)
3
+ language:
4
+ - yue
5
+ task_categories:
6
+ - automatic-speech-recognition
7
+ - text-to-speech
8
+ size_categories:
9
+ - 1M<n<10M
10
+ tags:
11
+ - cantonese
12
+ - speech
13
+ - emilia
14
+ - youtube
15
+ - speech-synthesis
16
+ configs:
17
+ - config_name: default
18
+ data_files:
19
+ - split: train
20
+ path: data/part-*.parquet
21
+ ---
22
+
23
+ # YouTube Cantonese — Emilia
24
+
25
+ **2,064,679 speaker-homogeneous Cantonese speech segments — 5,312.6 hours** — produced by
26
+ running [`alvanlii/cantonese-youtube`](https://huggingface.co/datasets/alvanlii/cantonese-youtube)
27
+ through the [Emilia](https://github.com/open-mmlab/Amphion/tree/main/preprocessors/Emilia)
28
+ speech-data pipeline (source separation → diarization → VAD segmentation → ASR → MOS filtering).
29
+
30
+ Each row is one clean, single-speaker segment of 3–30 s with a transcript, a speaker turn
31
+ label and a DNSMOS quality score. Audio is shipped separately as MP3s inside zip parts.
32
+
33
+ ## What's in the viewer
34
+
35
+ The dataset viewer shows the **metadata + transcripts** table (`data/part-a.parquet`,
36
+ `data/part-b.parquet`, concatenated into one `train` split). Audio is *not* embedded in the
37
+ parquet — it lives in the `output-audio-*.zip` parts and is joined by `audio_filename`, so
38
+ there is no inline playback in the viewer. See [Loading the audio](#loading-the-audio).
39
+
40
+ ## Files
41
+
42
+ | path | what |
43
+ |---|---|
44
+ | `data/part-a.parquet`, `data/part-b.parquet` | segment metadata + transcripts (280 MB total, 2,064,679 rows) |
45
+ | `output-audio-a-*.zip`, `output-audio-b-*.zip` | segment MP3s, 65 parts, 152.6 GB total |
46
+
47
+ `a` and `b` are the two machines that ran the pipeline. They processed disjoint sets of
48
+ clips — the two parquets share **no** `id`, so concatenating them introduces no duplicates.
49
+
50
+ ## Schema
51
+
52
+ | column | type | description |
53
+ |---|---|---|
54
+ | `id` | string | source clip id, zero-padded 10 digits (unique across the source dataset) |
55
+ | `shard` | string | source parquet shard, e.g. `train-00027-of-01090` |
56
+ | `segment_index` | int64 | 0-based index of this segment within its clip |
57
+ | `audio_filename` | string | path inside the audio zips: `<shard>/<id>/<id>_<segment_index>.mp3` |
58
+ | `text` | string | Whisper `large-v3` transcript, decoded as `yue` |
59
+ | `start` | double | segment start, seconds, relative to the source clip |
60
+ | `end` | double | segment end, seconds |
61
+ | `speaker` | string | pyannote speaker label, **local to the clip** (`SPEAKER_00`, `SPEAKER_01`, …) |
62
+ | `language` | string | always `yue` (forced, see [How it was built](#how-it-was-built)) |
63
+ | `dnsmos` | double | DNSMOS OVRL score of the segment |
64
+
65
+ Example row:
66
+
67
+ ```json
68
+ {
69
+ "id": "0000038032",
70
+ "shard": "train-00027-of-01090",
71
+ "segment_index": 0,
72
+ "audio_filename": "train-00027-of-01090/0000038032/0000038032_0.mp3",
73
+ "text": " 我地呢,就嚟咗第七区食一个Cribs嘅甜品。因为呢,我地等间諗住去一个百货公司,都系喺呢一区嚟嘅。…",
74
+ "start": 0.2344375,
75
+ "end": 23.3624375,
76
+ "speaker": "SPEAKER_01",
77
+ "language": "yue",
78
+ "dnsmos": 2.8213813060420665
79
+ }
80
+ ```
81
+
82
+ ## Statistics
83
+
84
+ | | |
85
+ |---|---|
86
+ | segments | 2,064,679 |
87
+ | total duration | 5,312.6 h |
88
+ | source clips represented | 1,106,929 |
89
+ | source shards represented | 1,090 / 1,090 |
90
+ | distinct (clip, speaker) turns | 1,188,909 |
91
+ | segment duration | mean 9.26 s · median 7.8 s · p90 17.0 s · range 3.0–30.0 s |
92
+ | DNSMOS (OVRL) | mean 3.13 · range 2.80–3.68 |
93
+ | transcript text | 139.7 M characters, mean 67.7 per segment |
94
+ | language | `yue` — 100 % |
95
+
96
+ Audio format: **24 kHz mono MP3**, loudness-normalized, and taken from the **separated vocal
97
+ stem** (not the original mix).
98
+
99
+ ## Loading
100
+
101
+ ### Metadata
102
+
103
+ ```python
104
+ from datasets import load_dataset
105
+
106
+ ds = load_dataset("Scicom-intl/YouTube-Cantonese-Emilia", split="train")
107
+ print(ds[0])
108
+ ```
109
+
110
+ Or straight from the parquet, which is faster if you only want to filter:
111
+
112
+ ```python
113
+ import pandas as pd
114
+
115
+ df = pd.read_parquet("hf://datasets/Scicom-intl/YouTube-Cantonese-Emilia/data/part-a.parquet")
116
+ df = df[df.dnsmos > 3.2]
117
+ ```
118
+
119
+ ### Loading the audio
120
+
121
+ Download the zip parts (152.6 GB — use `allow_patterns` to take a subset):
122
+
123
+ ```python
124
+ from huggingface_hub import snapshot_download
125
+
126
+ snapshot_download(
127
+ "Scicom-intl/YouTube-Cantonese-Emilia",
128
+ repo_type="dataset",
129
+ local_dir="ycd",
130
+ allow_patterns=["output-audio-a-*.zip"], # drop this to fetch everything
131
+ )
132
+ ```
133
+
134
+ ### Joining audio to metadata
135
+
136
+ `audio_filename` is the arcname inside whichever zip part happens to hold it, so build an
137
+ index once and reuse it:
138
+
139
+ ```python
140
+ import glob, zipfile, io
141
+ import soundfile as sf
142
+
143
+ index = {}
144
+ handles = {}
145
+ for path in glob.glob("ycd/output-audio-*.zip"):
146
+ handles[path] = zipfile.ZipFile(path)
147
+ for name in handles[path].namelist():
148
+ index[name] = path
149
+
150
+ def read_segment(audio_filename):
151
+ zf = handles[index[audio_filename]]
152
+ return sf.read(io.BytesIO(zf.read(audio_filename)))
153
+
154
+ wav, sr = read_segment(df.audio_filename.iloc[0])
155
+ ```
156
+
157
+ ## How it was built
158
+
159
+ Per source clip, in order:
160
+
161
+ 0. **Standardization** — 24 kHz, mono, 16-bit, loudness-normalized.
162
+ 1. **Source separation** — UVR-MDX-NET (`UVR-MDX-NET-Inst_HQ_3`) vocal extraction.
163
+ 2. **Speaker diarization** — `pyannote/speaker-diarization-3.1`.
164
+ 3. **Segmentation** — Silero VAD, merged and trimmed per speaker to 3–30 s.
165
+ 4. **ASR** — WhisperX / faster-whisper `large-v3`, **forced to `yue`**. The source is known to
166
+ be single-language, and per-segment language detection reliably mislabels Cantonese as
167
+ `zh`; forcing the label keeps every segment rather than dropping it.
168
+ 5. **Quality filter** — DNSMOS OVRL ≥ 2.8, duration 3–30 s, ≥ 2 characters of text, plus a
169
+ per-clip IQR outlier rejection on seconds-per-character (catches badly aligned segments).
170
+ 6. **Export** — one MP3 per surviving segment.
171
+
172
+ Of the 1,477,757 source clips processed, **1,106,929 (74.9 %) kept at least one segment**;
173
+ the rest were emptied by the quality filter or were unreadable.
174
+
175
+ Pipeline code: [Scicom-AI-Enterprise-Organization/Emilia](https://github.com/Scicom-AI-Enterprise-Organization/Emilia)
176
+ — a fork of Amphion's Emilia adapted for streaming HF parquet input and multi-GPU sharding.
177
+
178
+ ## Known limitations
179
+
180
+ - **Transcripts are machine-generated and unverified.** Base `large-v3` normalizes Cantonese
181
+ toward written/simplified Chinese even when the decode language is forced to `yue`. Many
182
+ segments do keep authentic Cantonese morphology (`嘅`, `咁`, `㗎`, `喺`, `唔`), but others read
183
+ closer to Mandarin. If you need reliable Cantonese orthography, re-transcribe with a
184
+ Cantonese-finetuned model — or use the source dataset's own `transcript_whisper` field.
185
+ - **Whisper repetition loops survive the filter.** A small fraction of segments degenerate
186
+ into a repeated token (e.g. `再,再,再,…`). Filter on character-repetition ratio if this
187
+ matters to you.
188
+ - **`speaker` is clip-local.** `SPEAKER_00` in two different clips is not the same person.
189
+ There is no global speaker identity resolution.
190
+ - **`dnsmos` has a floor of 2.8 by construction** — it is a filter threshold, not a full
191
+ quality ranking, so the column's dynamic range is narrow.
192
+ - **`start`/`end` index the standardized, vocals-separated clip**, which shares a timeline
193
+ with the source clip but not its audio content.
194
+ - **Coverage is 99.96 %, not 100 %.** 1,477,757 of the source dataset's 1,478,373 clips were
195
+ processed; 616 clips (0.04 %) were never completed because their worker was killed
196
+ mid-clip. They are simply absent — no partial rows.
197
+
198
+ ## Provenance and licensing
199
+
200
+ Derived from [`alvanlii/cantonese-youtube`](https://huggingface.co/datasets/alvanlii/cantonese-youtube)
201
+ (gated), which is itself sourced from YouTube. The underlying recordings remain subject to
202
+ their original terms; **no additional license is granted here**, and no license is asserted
203
+ over the source audio. Review the upstream dataset's terms before redistributing or training
204
+ on this data. The processing code is Apache-2.0.
205
+
206
+ ## Citation
207
+
208
+ The pipeline:
209
+
210
+ ```bibtex
211
+ @inproceedings{emilia,
212
+ author={He, Haorui and Shang, Zengqiang and Wang, Chaoren and Li, Xuyuan and Gu, Yicheng and Hua, Hua and Liu, Liwei and Yang, Chen and Li, Jiaqi and Shi, Peiyang and Wang, Yuancheng and Chen, Kai and Zhang, Pengyuan and Wu, Zhizheng},
213
+ title={Emilia: An Extensive, Multilingual, and Diverse Speech Dataset for Large-Scale Speech Generation},
214
+ booktitle={Proc.~of SLT},
215
+ year={2024}
216
+ }
217
+ ```