Native tone-aware Yorùbá Text-to-Speech (TTS) built on StyleTTS2 / Kokoro-82M, powered by oro-g2p ( pip install oro-g2p) and kokoro-tonal-kit.
- Interactive Gradio Demo (Free Google Colab):- Instant Audio Showcase:huggingface.co/spaces/Akintunde102/kokoro-yoruba-demo
- Model Weights (
526 MB, CC BY-SA 4.0):huggingface.co/Akintunde102/kokoro-yoruba-v1
git clone https://github.com/yl4579/StyleTTS2.git
pip install -r requirements.txt
python
from tts_yoruba import YorubaTTS
tts = YorubaTTS(styletts2_dir="./StyleTTS2") # Auto-downloads Akintunde102/kokoro-yoruba-v1
tts.speak("Ẹ kú àárọ̀ o! Báwo ni àwọn ará ilé?", voice="spk8", out_path="greeting.wav")
(Pass Yorùbá text with tone marks and underdots such as ọkọ̀ vs ọkọ so oro-g2p assigns the exact tones.)
- Trained on 2.70 hours of curated tone-marked Yorùbá (
BibleTTS+WaxalNLP), compressed from2091.5 MB→526.0 MB. - Voices:
spk8(Speaker 8 studio BibleTTS — flagship quality) andspk2(Speaker 2 WaxalNLP — quieter in v1 due to low training clip count). - Strong on short and in-domain Yorùbá clauses; rare 4–6 syllable compounds (Ṣàwòròidẹ ,ògbóǹtarìgì ) can still miss tones due to the small dataset and English-pretrained
PLBERT.
Contributors are welcome to build directly on Akintunde102/kokoro-yoruba-v1:
- Expand Clean Audio (
2.7h → 15h+): Split longer1.2s–5.8sstudio clips and balance multiple speakers cleanly. - Pre-train a Native Yorùbá
PLBERT: TrainUtils/PLBERT/on Yorùbá text corpora so multi-syllable compounds hold crisp tones. - Add Auto-Diacritization: Wire a Yorùbá tone-restoration model in front of
oro-g2pfor unaccented text input. - Add New Consenting Voicepacks: Train with unique
speaker_idtags (15+ minsper voice) and extract[1, 256]voicepacks afterspectral_normwarmup.
- Yorùbá G2P Engine (MIT):Akintunde102/oro-g2p
- Tonal Kokoro Starter Kit (MIT):Akintunde102/kokoro-tonal-kit
- Wrapper Code: MIT License (
LICENSE).Model Weights (kokoro_yoruba_gold.pth): CC BY-SA 4.0 (all audio outputs are AI-generated synthetic speech).