huseinzolkepliscicom commited on
Commit
481de13
·
verified ·
1 Parent(s): d92d396

Document trimmed audio + permutation configs

Browse files
Files changed (1) hide show
  1. README.md +95 -7
README.md CHANGED
@@ -18,6 +18,14 @@ configs:
18
  data_files:
19
  - split: train
20
  path: data/part-*.parquet
 
 
 
 
 
 
 
 
21
  ---
22
 
23
  # YouTube Cantonese — Emilia
@@ -28,14 +36,22 @@ through the [Emilia](https://github.com/open-mmlab/Amphion/tree/main/preprocesso
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
 
@@ -43,10 +59,16 @@ there is no inline playback in the viewer. See [Loading the audio](#loading-the-
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 |
@@ -127,10 +149,14 @@ 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
@@ -154,6 +180,68 @@ def read_segment(audio_filename):
154
  wav, sr = read_segment(df.audio_filename.iloc[0])
155
  ```
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  ## How it was built
158
 
159
  Per source clip, in order:
 
18
  data_files:
19
  - split: train
20
  path: data/part-*.parquet
21
+ - config_name: permutation
22
+ data_files:
23
+ - split: train
24
+ path: permutation/train-*
25
+ - config_name: permutation_sample
26
+ data_files:
27
+ - split: train
28
+ path: permutation_sample/train-*
29
  ---
30
 
31
  # YouTube Cantonese — Emilia
 
36
  speech-data pipeline (source separation → diarization → VAD segmentation → ASR → MOS filtering).
37
 
38
  Each row is one clean, single-speaker segment of 3–30 s with a transcript, a speaker turn
39
+ label and a DNSMOS quality score. Audio is shipped separately as MP3s inside zip parts, in
40
+ both an original and a silence-trimmed edition. A derived
41
+ [`permutation` config](#voice-cloning-pairs-permutation-config) supplies **1,635,566
42
+ same-speaker (reference, target) pairs** for voice cloning.
43
 
44
+ ## Configs
45
 
46
+ | config | rows | what |
47
+ |---|---|---|
48
+ | `default` | 2,064,679 | one row per segment: transcript, timing, speaker, DNSMOS |
49
+ | `permutation` | 1,635,566 | same-speaker (reference, target) utterance pairs |
50
+ | `permutation_sample` | 1,626,542 | `permutation` capped at 3 targets per reference |
51
+
52
+ The viewer shows these tables — **transcripts and metadata only**. Audio is *not* embedded in
53
+ the parquet; it lives in the zip parts and is joined by `audio_filename`, so there is no
54
+ inline playback. See [Loading the audio](#loading-the-audio).
55
 
56
  ## Files
57
 
 
59
  |---|---|
60
  | `data/part-a.parquet`, `data/part-b.parquet` | segment metadata + transcripts (280 MB total, 2,064,679 rows) |
61
  | `output-audio-a-*.zip`, `output-audio-b-*.zip` | segment MP3s, 65 parts, 152.6 GB total |
62
+ | `output-audio-trim-a-*.zip`, `output-audio-trim-b-*.zip` | the same segments with internal silence shortened — see [Silence-trimmed audio](#silence-trimmed-audio) |
63
+ | `permutation/train-*.parquet` | 1,635,566 (reference, target) voice-cloning pairs |
64
+ | `permutation_sample/train-*.parquet` | the same, capped at 3 targets per reference (99.4 % overlap) |
65
 
66
  `a` and `b` are the two machines that ran the pipeline. They processed disjoint sets of
67
  clips — the two parquets share **no** `id`, so concatenating them introduces no duplicates.
68
 
69
+ Both audio sets use **identical arcnames**, so one `audio_filename` resolves in either: pick
70
+ the untrimmed zips or the trimmed ones, and the metadata rows need no change.
71
+
72
  ## Schema
73
 
74
  | column | type | description |
 
149
  "Scicom-intl/YouTube-Cantonese-Emilia",
150
  repo_type="dataset",
151
  local_dir="ycd",
152
+ allow_patterns=["output-audio-a-*.zip"], # untrimmed, box a only
153
+ # allow_patterns=["output-audio-trim-*.zip"], # silence-trimmed, both boxes
154
  )
155
  ```
156
 
157
+ Take **one** of the two sets — `output-audio-*.zip` and `output-audio-trim-*.zip` hold the
158
+ same arcnames, so downloading both and indexing them together makes the later one win.
159
+
160
  ### Joining audio to metadata
161
 
162
  `audio_filename` is the arcname inside whichever zip part happens to hold it, so build an
 
180
  wav, sr = read_segment(df.audio_filename.iloc[0])
181
  ```
182
 
183
+ ## Silence-trimmed audio
184
+
185
+ `output-audio-trim-*.zip` holds a second copy of every segment with its **internal silences
186
+ shortened**. Same arcnames, same 24 kHz mono MP3 format — only the samples differ.
187
+
188
+ The segments are already VAD-cut, so this is a light touch: over a 4,000-file sample the
189
+ trimmed copy keeps **98.7 % of the original duration on average** (median 99.8 %, p10 96.8 %),
190
+ and **25 % of files come through untouched**. The tail is where it earns its keep — the
191
+ heaviest trim found was 6.83 s → 3.35 s. What it removes is the occasional long pause *inside*
192
+ a segment, which is the part that hurts TTS alignment.
193
+
194
+ Per file: 30 ms frames are labelled by WebRTC VAD (aggressiveness 3) on a 16 kHz
195
+ peak-normalised copy; runs of same-labelled frames are grouped; then each silence run is
196
+ shortened — leading silence keeps only its last 0.3 s, trailing silence only its first 0.3 s,
197
+ and an interior silence of ≥ 0.4 s is cut to 0.2 s from each end. Speech is never touched.
198
+
199
+ Use the trimmed set for TTS/voice-cloning training where dead air is wasted context; use the
200
+ untrimmed set when you need timings that line up with `start`/`end`, or are doing ASR where
201
+ the pauses are harmless.
202
+
203
+ Produced by [`trim_silence.py`](https://github.com/Scicom-AI-Enterprise-Organization/Emilia/blob/master/trim_silence.py)
204
+ in the pipeline repo, after [malaya-speech](https://github.com/malaysia-ai/malaya-speech).
205
+
206
+ ## Voice-cloning pairs (`permutation` config)
207
+
208
+ Beyond the segments themselves, the dataset ships **(reference, target) pairs** — two
209
+ utterances by the same speaker, for training or evaluating voice cloning.
210
+
211
+ ```python
212
+ from datasets import load_dataset
213
+
214
+ pairs = load_dataset("Scicom-intl/YouTube-Cantonese-Emilia", "permutation", split="train")
215
+ pairs[0]
216
+ # {'reference_audio': 'train-00027-of-01090/0000038032/0000038032_0.mp3',
217
+ # 'reference_text': '...',
218
+ # 'target_audio': 'train-00027-of-01090/0000038032/0000038032_1.mp3',
219
+ # 'target_text': '...'}
220
+ ```
221
+
222
+ `reference_audio` / `target_audio` use the **same paths as `audio_filename`** in the
223
+ `default` config, so they resolve against either zip set with no rewriting.
224
+
225
+ How a pair is made: within one clip, segments are kept only if their transcript passes the
226
+ quality filters (drops ASR boilerplate, mostly-single-character filler, Whisper repetition
227
+ loops, and any text with a 3-gram repeated more than three times). Surviving segments are
228
+ then paired within each diarized speaker, and a pair is emitted only if the two segments'
229
+ TitaNet-L speaker embeddings have cosine similarity **≥ 0.8** — a guard against diarization
230
+ having merged two voices under one label.
231
+
232
+ **1,635,566 pairs** drawn from 476,368 clips. Most clips contribute none: a (clip, speaker)
233
+ turn holds at most 7 segments and usually 1–2, and a lone segment cannot form a pair.
234
+
235
+ `permutation_sample` applies the same construction but caps each reference at 3 targets.
236
+ Because that cap almost never binds here, it retains **1,626,542 pairs — 99.4 % of
237
+ `permutation`**. It exists for parity with sibling datasets; for this corpus the two are
238
+ effectively the same table, so just use `permutation`.
239
+
240
+ > **Pairs are within a single clip, never across clips.** Speaker labels are clip-local
241
+ > (see [Known limitations](#known-limitations)), so there is no way to pair the same person
242
+ > across two different videos — and no claim that different clips with the same label are
243
+ > the same speaker.
244
+
245
  ## How it was built
246
 
247
  Per source clip, in order: