Instructions to use naijaml/f5-tts-yoruba with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- F5-TTS
How to use naijaml/f5-tts-yoruba with F5-TTS:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- yo
|
| 4 |
-
license: cc-by-4.0
|
| 5 |
tags:
|
| 6 |
- text-to-speech
|
| 7 |
- tts
|
|
@@ -24,6 +24,7 @@ Fine-tuned [F5-TTS v1 Base](https://github.com/SWivid/F5-TTS) (335M params) for
|
|
| 24 |
- **Tonal language support**: Diacritic-driven pitch generation (ẹ́, ọ̀, ṣ, etc.)
|
| 25 |
- **First of its kind**: First DiT-based / flow-matching TTS model for any African language
|
| 26 |
- **Character-level tokenization**: No phonemizer needed — raw Yorùbá text with diacritics in, speech out
|
|
|
|
| 27 |
|
| 28 |
## Training Details
|
| 29 |
|
|
@@ -42,12 +43,12 @@ Fine-tuned [F5-TTS v1 Base](https://github.com/SWivid/F5-TTS) (335M params) for
|
|
| 42 |
## Usage
|
| 43 |
|
| 44 |
```python
|
| 45 |
-
from f5_tts.api import F5TTS
|
| 46 |
import f5_tts.model.utils as f5_utils
|
| 47 |
-
|
| 48 |
-
# CRITICAL: Bypass pinyin conversion before importing
|
| 49 |
f5_utils.convert_char_to_pinyin = lambda texts, polyphone=True: texts
|
| 50 |
|
|
|
|
|
|
|
| 51 |
f5tts = F5TTS(
|
| 52 |
model="F5TTS_v1_Base",
|
| 53 |
ckpt_file="model_150000.pt",
|
|
@@ -55,18 +56,28 @@ f5tts = F5TTS(
|
|
| 55 |
device="cuda",
|
| 56 |
)
|
| 57 |
|
| 58 |
-
# ref_file: 5-10s WAV of any voice
|
| 59 |
# ref_text: what the reference says (Yorùbá or English)
|
| 60 |
# gen_text: Yorùbá text with full diacritics
|
| 61 |
wav, sr, _ = f5tts.infer(
|
| 62 |
ref_file="reference.wav",
|
| 63 |
ref_text="text spoken in reference",
|
| 64 |
gen_text="ẹ kú àárọ̀, báwo ni àwọn ọmọ yín ṣe wà?",
|
| 65 |
-
speed=
|
|
|
|
| 66 |
file_wave="output.wav",
|
| 67 |
)
|
| 68 |
```
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
## Training Data
|
| 71 |
|
| 72 |
| Source | Samples | Hours | Notes |
|
|
@@ -78,17 +89,29 @@ wav, sr, _ = f5tts.infer(
|
|
| 78 |
## Limitations
|
| 79 |
|
| 80 |
- Tonal minimal pair differentiation is moderate (not perfect for all tone contrasts)
|
| 81 |
-
-
|
|
|
|
| 82 |
- Requires full Yorùbá diacritics in input text for best results
|
| 83 |
- Reference audio quality directly affects output quality
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
## License
|
| 86 |
|
| 87 |
-
CC-BY-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
## Citation
|
| 90 |
|
| 91 |
-
```
|
| 92 |
@misc{naijaml-f5tts-yoruba-2026,
|
| 93 |
title={F5-TTS Yorùbá: First Zero-Shot Voice Cloning TTS for Yorùbá},
|
| 94 |
author={NaijaML},
|
|
@@ -96,3 +119,7 @@ CC-BY-4.0 (following BibleTTS and SLR86 licenses)
|
|
| 96 |
url={https://huggingface.co/naijaml/f5-tts-yoruba}
|
| 97 |
}
|
| 98 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- yo
|
| 4 |
+
license: cc-by-nc-4.0
|
| 5 |
tags:
|
| 6 |
- text-to-speech
|
| 7 |
- tts
|
|
|
|
| 24 |
- **Tonal language support**: Diacritic-driven pitch generation (ẹ́, ọ̀, ṣ, etc.)
|
| 25 |
- **First of its kind**: First DiT-based / flow-matching TTS model for any African language
|
| 26 |
- **Character-level tokenization**: No phonemizer needed — raw Yorùbá text with diacritics in, speech out
|
| 27 |
+
- **Fast inference**: ~350ms per utterance at NFE=16 on L4 GPU (RTF ≈ 0.15)
|
| 28 |
|
| 29 |
## Training Details
|
| 30 |
|
|
|
|
| 43 |
## Usage
|
| 44 |
|
| 45 |
```python
|
|
|
|
| 46 |
import f5_tts.model.utils as f5_utils
|
| 47 |
+
# CRITICAL: Must bypass pinyin conversion BEFORE any other F5-TTS import
|
|
|
|
| 48 |
f5_utils.convert_char_to_pinyin = lambda texts, polyphone=True: texts
|
| 49 |
|
| 50 |
+
from f5_tts.api import F5TTS
|
| 51 |
+
|
| 52 |
f5tts = F5TTS(
|
| 53 |
model="F5TTS_v1_Base",
|
| 54 |
ckpt_file="model_150000.pt",
|
|
|
|
| 56 |
device="cuda",
|
| 57 |
)
|
| 58 |
|
| 59 |
+
# ref_file: 5-10s WAV of any voice (add ~1s trailing silence for best results)
|
| 60 |
# ref_text: what the reference says (Yorùbá or English)
|
| 61 |
# gen_text: Yorùbá text with full diacritics
|
| 62 |
wav, sr, _ = f5tts.infer(
|
| 63 |
ref_file="reference.wav",
|
| 64 |
ref_text="text spoken in reference",
|
| 65 |
gen_text="ẹ kú àárọ̀, báwo ni àwọn ọmọ yín ṣe wà?",
|
| 66 |
+
speed=1.0,
|
| 67 |
+
nfe_step=16,
|
| 68 |
file_wave="output.wav",
|
| 69 |
)
|
| 70 |
```
|
| 71 |
|
| 72 |
+
### Tips for Best Results
|
| 73 |
+
|
| 74 |
+
- **Use full diacritics**: "oko" (hoe), "okó" (husband), "okò" (vehicle) are different words. Diacritics drive pitch.
|
| 75 |
+
- **Reference audio**: Use clean 5-10 second clips with ~1 second of trailing silence. Avoid background music/noise.
|
| 76 |
+
- **Reference text**: Must accurately match what is spoken in the reference audio.
|
| 77 |
+
- **NFE steps**: 16 recommended for best quality/speed tradeoff. Use 8 for faster inference with slight quality reduction.
|
| 78 |
+
- **Speed**: 1.0 recommended. Lower values (e.g. 0.85) may prevent truncation on long text but can cause slight shakiness.
|
| 79 |
+
- **Text cleanup**: Strip any bracket tags (e.g. `[breath]`, `[snap]`) from reference text if present.
|
| 80 |
+
|
| 81 |
## Training Data
|
| 82 |
|
| 83 |
| Source | Samples | Hours | Notes |
|
|
|
|
| 89 |
## Limitations
|
| 90 |
|
| 91 |
- Tonal minimal pair differentiation is moderate (not perfect for all tone contrasts)
|
| 92 |
+
- Occasional brief audio artifacts (~5% of generations) — regenerating typically produces a clean output
|
| 93 |
+
- Reference audio may bleed slightly into the start of generated audio — trimming the first 200-400ms helps
|
| 94 |
- Requires full Yorùbá diacritics in input text for best results
|
| 95 |
- Reference audio quality directly affects output quality
|
| 96 |
|
| 97 |
+
## What's Next
|
| 98 |
+
|
| 99 |
+
- Phase 2 tonal fine-tuning (oversampled minimal pairs)
|
| 100 |
+
- Hausa and Igbo models using the same pipeline
|
| 101 |
+
- Nigerian Pidgin (non-tonal, simpler)
|
| 102 |
+
- Edge-optimized smaller model for on-device inference
|
| 103 |
+
|
| 104 |
## License
|
| 105 |
|
| 106 |
+
CC-BY-NC-4.0
|
| 107 |
+
|
| 108 |
+
This model is free for research and non-commercial use. For commercial licensing, contact us.
|
| 109 |
+
|
| 110 |
+
The base F5-TTS pretrained model is licensed under CC-BY-NC due to the Emilia training dataset.
|
| 111 |
|
| 112 |
## Citation
|
| 113 |
|
| 114 |
+
```bibtex
|
| 115 |
@misc{naijaml-f5tts-yoruba-2026,
|
| 116 |
title={F5-TTS Yorùbá: First Zero-Shot Voice Cloning TTS for Yorùbá},
|
| 117 |
author={NaijaML},
|
|
|
|
| 119 |
url={https://huggingface.co/naijaml/f5-tts-yoruba}
|
| 120 |
}
|
| 121 |
```
|
| 122 |
+
|
| 123 |
+
## Acknowledgments
|
| 124 |
+
|
| 125 |
+
Built on [F5-TTS](https://github.com/SWivid/F5-TTS) by Yushen Chen et al. Training data from [BibleTTS](https://masakhane-io.github.io/bibleTTS/), [SLR86](https://openslr.org/86/), and [Google WAXAL](https://huggingface.co/datasets/google/WaxalNLP).
|