rlabz commited on
Commit
796af33
·
verified ·
1 Parent(s): 2f923b5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -19
README.md CHANGED
@@ -1,21 +1,122 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: input_ids
5
- list: int32
6
- - name: labels
7
- list: int64
8
- - name: attention_mask
9
- list: int8
10
- splits:
11
- - name: train
12
- num_bytes: 8688858.0
13
- num_examples: 1785
14
- download_size: 2957485
15
- dataset_size: 8688858.0
16
- configs:
17
- - config_name: default
18
- data_files:
19
- - split: train
20
- path: data/train-*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ---
 
1
  ---
2
+ language:
3
+ - sw
4
+ license: cc0-1.0
5
+ task_categories:
6
+ - text-to-speech
7
+ pretty_name: Swahili (swa_spk3) SNAC-Tokenized TTS Dataset for Orpheus Fine-Tuning
8
+ size_categories:
9
+ - 1K<n<10K
10
+ tags:
11
+ - tts
12
+ - speech
13
+ - swahili
14
+ - kiswahili
15
+ - snac
16
+ - orpheus
17
+ - audio-tokens
18
+ - low-resource
19
+ - african-languages
20
+ ---
21
+
22
+ # Swahili (swa_spk3) SNAC-Tokenized Dataset for Orpheus-TTS Fine-Tuning
23
+
24
+ ## Dataset Summary
25
+
26
+ A single-speaker Kiswahili subset, resampled and tokenized for fine-tuning [Orpheus-TTS](https://github.com/canopyai/Orpheus-TTS). It is derived from [`rlabz/swa_lug_tts`](https://huggingface.co/datasets/rlabz/swa_lug_tts) by:
27
+
28
+ 1. Filtering the `train` and `validation` splits down to speaker **`swa_spk3`** only.
29
+ 2. Resampling all audio from its original 22,050 Hz to **24,000 Hz**, the sample rate required by [SNAC](https://github.com/hubertsiuzdak/snac) (`snac_24khz`), the neural audio codec Orpheus is trained on.
30
+ 3. Encoding each clip with SNAC into discrete audio codes and interleaving them with the text transcript into a single `input_ids` sequence, following the tokenization scheme used in the official [Orpheus fine-tuning notebook](https://github.com/canopyai/Orpheus-TTS).
31
+
32
+ The result is a training-ready dataset: no further audio processing is needed before feeding it into the Orpheus fine-tuning script.
33
+
34
+ - **Source speaker subset:** `swa_spk3` from `rlabz/swa_lug_tts`
35
+ - **Language:** Kiswahili (`sw`)
36
+ - **Audio codec / sample rate:** SNAC @ 24kHz
37
+ - **Intended use:** Fine-tuning Orpheus-TTS (Llama-3B-backbone) for a single Kiswahili voice
38
+ - **License:** [CC0 1.0 Public Domain](https://creativecommons.org/publicdomain/zero/1.0/) (inherited from the source dataset)
39
+
40
+ ## Dataset Structure
41
+
42
+ ### Data Splits
43
+
44
+ | Split | Utterances |
45
+ |---|---|
46
+ | train | 1,785 |
47
+ | validation | 198 |
48
+
49
+ ### Data Fields
50
+
51
+ > ⚠️ The exact tokenization script used determines the precise field names — adjust this table if your pipeline's output differs.
52
+
53
+ | Field | Type | Description |
54
+ |---|---|---|
55
+ | `input_ids` | `list[int]` | Interleaved sequence of text token IDs (from the Llama tokenizer) and SNAC audio token IDs, following Orpheus's `<start_of_text> text <end_of_text> <start_of_speech> audio_codes <end_of_speech>` layout. Audio tokens are offset above the text vocabulary (IDs ≥ 128,000) so they occupy a disjoint range from text tokens. |
56
+ | `labels` | `list[int]` | Copy of `input_ids` used for next-token-prediction loss (standard causal LM fine-tuning target). |
57
+ | `attention_mask` | `list[int]` | Standard attention mask, all `1`s for non-padded sequences. |
58
+ | `speaker_id` | `string` | Always `swa_spk3` in this subset. |
59
+ | `language` | `string` | Always `swa`. |
60
+
61
+ ### Data Instance
62
+
63
+ ```python
64
+ {
65
+ "input_ids": [128259, 264, 1495, ..., 128266, 7, 42, 91, ..., 128257],
66
+ "labels": [128259, 264, 1495, ..., 128266, 7, 42, 91, ..., 128257],
67
+ "attention_mask": [1, 1, 1, ...],
68
+ "speaker_id": "swa_spk3",
69
+ "language": "swa"
70
+ }
71
+ ```
72
+
73
+ ## Dataset Creation
74
+
75
+ ### Source Data
76
+
77
+ Traces back to the [Luganda-Swahili Speech for Text-to-Speech Synthesis](https://www.kaggle.com/datasets/jocelyndumlao/luganda-swahili-speech-for-text-to-speechsynthesis/data) Kaggle dataset (CC0), processed into [`rlabz/swa_lug_tts`](https://huggingface.co/datasets/rlabz/swa_lug_tts) — see that dataset's card for details on corrupt-file filtering, speaker clustering, and the stratified train/validation split.
78
+
79
+ ### Processing Steps
80
+
81
+ 1. **Load** `rlabz/swa_lug_tts` and filter both `train` and `validation` splits to `speaker_id == "swa_spk3"` (1,785 train / 198 validation utterances).
82
+ 2. **Resample** the `audio` column from 22,050 Hz to 24,000 Hz via `datasets.Audio(sampling_rate=24000)`, matching SNAC's expected input rate.
83
+ 3. **Tokenize** each utterance with SNAC (`snac_24khz`) to produce hierarchical discrete audio codes, then interleave those codes with the text transcript's Llama tokenizer IDs into a single flat `input_ids` sequence, per the Orpheus fine-tuning data format.
84
+
85
+ ### Why a single-speaker subset?
86
+
87
+ Orpheus fine-tuning for a specific voice is typically done on a single, consistent speaker rather than the full multi-speaker corpus, since mixing speakers in a single-voice fine-tune degrades voice consistency. `swa_spk3` was selected as the target voice for this fine-tune; the other 11 speakers in `rlabz/swa_lug_tts` remain available for separate single-speaker or multi-speaker experiments.
88
+
89
+ ## Intended Use
90
+
91
+ This dataset is intended as direct input to the [Orpheus-TTS fine-tuning script](https://github.com/canopyai/Orpheus-TTS/tree/main/finetune) to produce a Kiswahili single-voice TTS model. It is not intended as a general-purpose ASR or multi-speaker TTS dataset — for that, use the source [`rlabz/swa_lug_tts`](https://huggingface.co/datasets/rlabz/swa_lug_tts) dataset instead.
92
+
93
+ ## Licensing Information
94
+
95
+ Released under [CC0 1.0 Universal (Public Domain Dedication)](https://creativecommons.org/publicdomain/zero/1.0/), matching the license of the original Kaggle source and the parent `rlabz/swa_lug_tts` dataset.
96
+
97
+ ## Citation
98
+
99
+ ```bibtex
100
+ @misc{lugswa_tts_kaggle,
101
+ title = {Luganda-Swahili Speech for Text-to-Speech Synthesis},
102
+ author = {Dumlao, Jocelyn},
103
+ year = {2024},
104
+ url = {https://www.kaggle.com/datasets/jocelyndumlao/luganda-swahili-speech-for-text-to-speechsynthesis/data}
105
+ }
106
+ ```
107
+
108
+ Orpheus-TTS:
109
+
110
+ ```bibtex
111
+ @misc{orpheus_tts,
112
+ title = {Orpheus-TTS: Towards Human-Sounding Speech},
113
+ author = {Canopy Labs},
114
+ year = {2025},
115
+ url = {https://github.com/canopyai/Orpheus-TTS}
116
+ }
117
+ ```
118
+
119
+ ## Acknowledgements
120
+
121
+ Speaker filtering, resampling, and SNAC tokenization were performed as part of Orpheus fine-tuning data preparation under `rlabz`.
122
  ---