| --- |
| language: |
| - sw |
| license: cc0-1.0 |
| task_categories: |
| - text-to-speech |
| pretty_name: Swahili (swa_spk3) SNAC-Tokenized TTS Dataset for Orpheus Fine-Tuning |
| size_categories: |
| - 1K<n<10K |
| tags: |
| - tts |
| - speech |
| - swahili |
| - kiswahili |
| - snac |
| - orpheus |
| - audio-tokens |
| - low-resource |
| - african-languages |
| --- |
| |
| # Swahili (swa_spk3) SNAC-Tokenized Dataset for Orpheus-TTS Fine-Tuning |
| |
| ## Dataset Summary |
| |
| 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: |
| |
| 1. Filtering the `train` and `validation` splits down to speaker **`swa_spk3`** only. |
| 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. |
| 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). |
|
|
| The result is a training-ready dataset: no further audio processing is needed before feeding it into the Orpheus fine-tuning script. |
|
|
| - **Source speaker subset:** `swa_spk3` from `rlabz/swa_lug_tts` |
| - **Language:** Kiswahili (`sw`) |
| - **Audio codec / sample rate:** SNAC @ 24kHz |
| - **Intended use:** Fine-tuning Orpheus-TTS (Llama-3B-backbone) for a single Kiswahili voice |
| - **License:** [CC0 1.0 Public Domain](https://creativecommons.org/publicdomain/zero/1.0/) (inherited from the source dataset) |
|
|
| ## Dataset Structure |
|
|
| ### Data Splits |
|
|
| | Split | Utterances | |
| |---|---| |
| | train | 1,785 | |
| | validation | 198 | |
|
|
| ### Data Fields |
|
|
| > ⚠️ The exact tokenization script used determines the precise field names — adjust this table if your pipeline's output differs. |
|
|
| | Field | Type | Description | |
| |---|---|---| |
| | `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. | |
| | `labels` | `list[int]` | Copy of `input_ids` used for next-token-prediction loss (standard causal LM fine-tuning target). | |
| | `attention_mask` | `list[int]` | Standard attention mask, all `1`s for non-padded sequences. | |
| | `speaker_id` | `string` | Always `swa_spk3` in this subset. | |
| | `language` | `string` | Always `swa`. | |
|
|
| ### Data Instance |
|
|
| ```python |
| { |
| "input_ids": [128259, 264, 1495, ..., 128266, 7, 42, 91, ..., 128257], |
| "labels": [128259, 264, 1495, ..., 128266, 7, 42, 91, ..., 128257], |
| "attention_mask": [1, 1, 1, ...], |
| "speaker_id": "swa_spk3", |
| "language": "swa" |
| } |
| ``` |
|
|
| ## Dataset Creation |
|
|
| ### Source Data |
|
|
| 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. |
|
|
| ### Processing Steps |
|
|
| 1. **Load** `rlabz/swa_lug_tts` and filter both `train` and `validation` splits to `speaker_id == "swa_spk3"` (1,785 train / 198 validation utterances). |
| 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. |
| 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. |
|
|
| ### Why a single-speaker subset? |
|
|
| 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. |
|
|
| ## Intended Use |
|
|
| 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. |
|
|
| ## Licensing Information |
|
|
| 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. |
|
|
| ## Citation |
|
|
| ```bibtex |
| @misc{lugswa_tts_kaggle, |
| title = {Luganda-Swahili Speech for Text-to-Speech Synthesis}, |
| author = {Dumlao, Jocelyn}, |
| year = {2024}, |
| url = {https://www.kaggle.com/datasets/jocelyndumlao/luganda-swahili-speech-for-text-to-speechsynthesis/data} |
| } |
| ``` |
|
|
| Orpheus-TTS: |
|
|
| ```bibtex |
| @misc{orpheus_tts, |
| title = {Orpheus-TTS: Towards Human-Sounding Speech}, |
| author = {Canopy Labs}, |
| year = {2025}, |
| url = {https://github.com/canopyai/Orpheus-TTS} |
| } |
| ``` |
|
|
| ## Acknowledgements |
|
|
| Speaker filtering, resampling, and SNAC tokenization were performed as part of Orpheus fine-tuning data preparation under `rlabz`. |
| --- |
|
|