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.

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-pretrainedPLBERT .

Contributors are welcome to build directly on Akintunde102/kokoro-yoruba-v1:

  1. Expand Clean Audio (2.7h → 15h+): Split longer 1.2s–5.8s studio clips and balance multiple speakers cleanly.
  2. Pre-train a Native Yorùbá PLBERT: Train Utils/PLBERT/ on Yorùbá text corpora so multi-syllable compounds hold crisp tones.
  3. Add Auto-Diacritization: Wire a Yorùbá tone-restoration model in front oforo-g2p for unaccented text input.
  4. Add New Consenting Voicepacks: Train with uniquespeaker_id tags (15+ mins per voice) and extract[1, 256] voicepacks afterspectral_norm warmup.

原文来源:github.com