Instructions to use LyngualLabs/VoxCPM2-Yoruba with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- VoxCPM
How to use LyngualLabs/VoxCPM2-Yoruba with VoxCPM:
import soundfile as sf from voxcpm import VoxCPM model = VoxCPM.from_pretrained("LyngualLabs/VoxCPM2-Yoruba") wav = model.generate( text="VoxCPM is an innovative end-to-end TTS model from ModelBest, designed to generate highly expressive speech.", prompt_wav_path=None, # optional: path to a prompt speech for voice cloning prompt_text=None, # optional: reference text cfg_value=2.0, # LM guidance on LocDiT, higher for better adherence to the prompt, but maybe worse inference_timesteps=10, # LocDiT inference timesteps, higher for better result, lower for fast speed normalize=True, # enable external TN tool denoise=True, # enable external Denoise tool retry_badcase=True, # enable retrying mode for some bad cases (unstoppable) retry_badcase_max_times=3, # maximum retrying times retry_badcase_ratio_threshold=6.0, # maximum length restriction for bad case detection (simple but effective), it could be adjusted for slow pace speech ) sf.write("output.wav", wav, 16000) print("saved: output.wav") - Notebooks
- Google Colab
- Kaggle
VoxCPM2-Yoruba (Experimental)
⚠️ Experimental research model. An early full fine-tune of VoxCPM2 for Yoruba and Yoruba–English code-switched speech. Promising but not production-grade — expect occasional mispronunciations, tone errors, and artifacts.
A Yoruba text-to-speech model from LyngualLabs, full fine-tuned from openbmb/VoxCPM2 — a 2B, tokenizer-free, voice-cloning TTS. It speaks Yoruba in native script, including code-switching with English, with no G2P / espeak / language tags.
Why
VoxCPM2 ships 30 languages but not Yoruba. Adapting a new language is a high-rank change, so LoRA plateaued; this is the full fine-tune (all 2B weights) that installs Yoruba phonetics and tones.
Training data
| Source | Hours | Notes |
|---|---|---|
| YECS (LyngualLabs) | ~95 h | Yoruba–English code-switch, multi-speaker, 16 kHz |
WAXAL Yoruba (google/WaxalNLP) |
~7.5 h | spontaneous |
| Total | ~102 h | pooled, 16 kHz |
Training
- Method: full fine-tuning (all weights), not LoRA
- Base: openbmb/VoxCPM2 (2B) · Steps: 5000 (selected at the validation-loss minimum)
- LR: 1e-5 cosine · Effective batch: 32 (bs 4 × grad-accum 8) · bf16
- Hardware: single NVIDIA RTX 6000 Blackwell (96 GB)
Usage
A voice-cloning model: give a short reference clip + its transcript, and it speaks your text in that voice — or use voice-design (a text description, no reference).
# pip install git+https://github.com/OpenBMB/VoxCPM.git
from huggingface_hub import snapshot_download
from voxcpm import VoxCPM
import soundfile as sf
model_dir = snapshot_download("LyngualLabs/VoxCPM2-Yoruba")
model = VoxCPM.from_pretrained(model_dir, load_denoiser=False)
# --- voice cloning: a reference clip + its exact transcript ---
wav = model.generate(
text="Mo fẹ́ learn how to code, ṣùgbọ́n mi ò mọ programming language wo ló make sense.",
prompt_wav_path="reference.wav",
prompt_text="Ìròyìn ti sọ pé the government will ensure electricity tariff goes down ní January.",
cfg_value=2.0,
inference_timesteps=22,
)
sf.write("output.wav", wav, model.tts_model.sample_rate)
# --- or voice-design (no reference): prepend a voice description in parentheses ---
wav = model.generate(
text="(A young Nigerian woman, clear voice) Ẹ kú àárọ̀, ẹ jọ̀ọ́ ẹ jẹ́ ká bẹ̀rẹ̀ ìpàdé.",
cfg_value=2.0,
inference_timesteps=22,
)
sf.write("voice_design.wav", wav, model.tts_model.sample_rate)
Tips: raise inference_timesteps (20–25) for smoother audio; cfg_value higher sticks
closer to the reference.
Audio samples
Synthesized by this model (step 5000) — code-switched Yoruba–English, cloned from a single reference voice.
If rain falls tomorrow, jọ̀ọ́ rántí láti mú umbrella àti raincoat.
Ìròyìn ti sọ pé the government will ensure electricity tariff goes down ní January.
Ẹ̀gbọ́n mi tó ń ṣiṣẹ́ ní bank ti gba promotion, we're all so so happy.
Mo fẹ́ learn how to code, ṣùgbọ́n mi ò mọ programming language wo ló make sense.
Wọ́n ní ìpàdé ní hotel tó wà ní Victoria Island, kì í ṣe ní office wa.
Diverse voices
The same model can render different voices via voice-design (a text description, no reference clip):
Woman — Wọ́n ní ìpàdé ní hotel tó wà ní Victoria Island, kì í ṣe ní office wa.
Young man — Mo fẹ́ learn how to code, ṣùgbọ́n mi ò mọ programming language wo ló make sense.
Energetic — Ẹ̀gbọ́n mi tó ń ṣiṣẹ́ ní bank ti gba promotion, we're all so so happy.
Limitations
- Experimental — not production quality; errors increase on long / number-heavy text.
- Multi-speaker training — use a reference clip for a consistent voice.
- Specialized to Yoruba — full FT trades the base's other-language ability for Yoruba.
- Reflects the spontaneous + code-switched style of its training data.
Credits & license
Base: OpenBMB/VoxCPM2 (Apache-2.0) · Data: YECS
(LyngualLabs), WAXAL (google/WaxalNLP) · Part of the WAXAL speech effort · Apache-2.0.
- Downloads last month
- 129
Model tree for LyngualLabs/VoxCPM2-Yoruba
Base model
openbmb/VoxCPM2