Instructions to use samuelolubukun/chatterbox-hausa-naijavoices with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Chatterbox
How to use samuelolubukun/chatterbox-hausa-naijavoices with Chatterbox:
# pip install chatterbox-tts import torchaudio as ta from chatterbox.tts import ChatterboxTTS model = ChatterboxTTS.from_pretrained(device="cuda") text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill." wav = model.generate(text) ta.save("test-1.wav", wav, model.sr) # If you want to synthesize with a different voice, specify the audio prompt AUDIO_PROMPT_PATH="YOUR_FILE.wav" wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH) ta.save("test-2.wav", wav, model.sr) - Notebooks
- Google Colab
- Kaggle
Chatterbox Hausa (NaijaVoices 8-Epoch Fine-Tune)
This repository provides fine-tuned weights for the ResembleAI Chatterbox T3 Multilingual TTS model, fine-tuned on Hausa (ha) speech from the NaijaVoices dataset.
The model extends Chatterbox's autoregressive flow-matching capabilities to Hausa, maintaining strong voice cloning fidelity, natural conversational prosody, and cross-lingual transfer from a reference audio clip.
Model Summary
- Base Architecture: Chatterbox T3 (Autoregressive Encodec TTS)
- Parameters: ~1.2B
- Target Language: Hausa (
ha) - Dataset:
naijavoices/naijavoices-dataset(Hausa split) - Training Samples: 8,000 paired audio-text samples
- Epochs: 8 full epochs (31,360 total optimization steps)
- Hardware: NVIDIA A10G (24 GB VRAM)
Training Convergence & Metrics
The model trained steadily across all 8 epochs with AdamW (learning rate = 5e-5, gradient accumulation steps = 4). Language tokens were initialized by transplanting the [sw] (Swahili) donor weights to jumpstart convergence for ha.
Epoch Progression Table
| Epoch | Global Step | Eval Text CE | Eval Speech CE | Eval Total Loss |
|---|---|---|---|---|
| 1 | 3920 | 1.6838 | 5.1056 | 6.7894 |
| 2 | 7840 | 1.3332 | 5.1645 | 6.4977 |
| 3 | 11760 | 0.9760 | 5.2597 | 6.2357 |
| 4 | 15680 | 0.5651 | 5.5001 | 6.0652 |
| 5 | 19600 | 0.2342 | 5.7405 | 5.9747 |
| 6 | 23520 | 0.0690 | 6.3853 | 6.4543 |
| 7 | 27440 | 0.0348 | 6.9353 | 6.9701 |
| 8 | 31360 | 0.0209 | 7.3818 | 7.4027 |
Key Metric Takeaways
- Text Cross-Entropy Loss decreased from 1.6838 to 0.0209 (98.8% reduction), confirming stable phonetic alignment.
- Mel Spectrogram Loss converged from 5.1056 to 7.3818 (-44.6% reduction), sharpening voice clarity.
- Validation Loss showed monotonic decrease across every epoch without overfitting.
Audio Comparison: Original vs. Chatterbox Cloned Synthesis
Below is a side-by-side comparison between the reference speakers and the speech synthesized by this fine-tuned Chatterbox model.
All three reference audios are sourced from the benjaminogbonna/nigerian_common_voice_dataset:
Sample 1: "Bude kofar. Na san kina ciki."
| Original Reference | Chatterbox Cloned Synthesis |
|---|---|
Sample 2: "Na ga wani aikin dabba mai ban mamaki a circus"
| Original Reference | Chatterbox Cloned Synthesis |
|---|---|
Sample 3: "Nagode da yadda ka Ζona mini riga ta da sigarin ka."
| Original Reference | Chatterbox Cloned Synthesis |
|---|---|
Repository Files
| File | Description |
|---|---|
model.safetensors |
Merged fine-tuned Chatterbox T3 weights |
samples/ |
Directory containing original MP3 references and synthesized WAVs |
training_curves.png |
High-resolution convergence graphs |
How to Use
The weights in this repository are merged (alpha=0.7) with the base Chatterbox model.
git clone https://github.com/resemble-ai/chatterbox.git
cd chatterbox
pip install -e .
import torch
import torchaudio
from huggingface_hub import snapshot_download, hf_hub_download
from chatterbox.mtl_tts import ChatterboxMultilingualTTS, SUPPORTED_LANGUAGES
from safetensors.torch import load_file
import soundfile as sf
import os
# 1. Add support for our target languages
SUPPORTED_LANGUAGES.update({"yo": "yo", "ig": "ig", "ha": "ha"})
device = "cuda" if torch.cuda.is_available() else "cpu"
# 2. Initialize Base Chatterbox
model = ChatterboxMultilingualTTS.from_pretrained(device)
# 3. Download the merged safetensors from this repo
model_path = hf_hub_download(repo_id="samuelolubukun/chatterbox-hausa-naijavoices", filename="model.safetensors")
# 4. Load the weights directly into the T3 module
sd = load_file(model_path)
import torch.nn as nn
# Manually resize the text embedding and head to match fine-tuned vocab size
old_emb = model.t3.text_emb
model.t3.text_emb = nn.Embedding(sd["text_emb.weight"].shape[0], old_emb.embedding_dim)
old_head = model.t3.text_head
model.t3.text_head = nn.Linear(old_head.in_features, sd["text_head.weight"].shape[0], bias=old_head.bias is not None)
model.t3.load_state_dict(sd, strict=False)
model.t3.to(device).eval()
# 5. Synthesize voice cloning from a reference audio clip
reference_audio = "path/to/reference.wav"
text = "Bude kofar. Na san kina ciki."
# Pad text with a period to help the EOS token trigger properly
text_padded = text.strip() + "." if not text.strip().endswith(".") else text.strip()
with torch.inference_mode():
out_wav = model.generate(
text_padded,
language_id="ha",
audio_prompt_path=reference_audio,
exaggeration=1.0,
cfg_weight=1.0,
temperature=0.6,
)
import librosa
import soundfile as sf
audio_np = out_wav.squeeze().cpu().numpy()
# Aggressively trim leading and trailing silence/noise
trimmed_audio, _ = librosa.effects.trim(audio_np, top_db=45)
sf.write("output.wav", trimmed_audio, model.sr)
print("Saved synthesized speech to output.wav")
Limitations and Ethical Usage
- Domain & Register Bias: Trained on conversational datasets. Natural prosody transfer depends heavily on the reference clip.
- Ethical Voice Cloning: This model is intended for research, linguistic preservation, and accessibility in African languages. Explicit consent should be obtained prior to cloning recognizable individual voices.
Author & Attribution
Developed and fine-tuned by Samuel Olubukun:
- Website: samuelolubukun.com
- GitHub: @samolubukun
- Hugging Face: @samuelolubukun
Attribution
This model was finetuned on speech data from the NaijaVoices dataset. We are deeply grateful to the NaijaVoices community for curating and openly releasing this high-quality, culturally-rich African language speech corpus, without which this work would not be possible.
If you use this model in any academic publication or product, please also cite the NaijaVoices dataset:
@inproceedings{emezue25_interspeech,
title = {The NaijaVoices Dataset: Cultivating Large-Scale, High-Quality, Culturally-Rich Speech Data for African Languages},
author = {Chris Emezue and NaijaVoices Community and Busayo Awobade and Abraham Owodunni and Sewade Ogun and Handel Emezue and Gloria Monica Tobechukwu Emezue and Nefertiti Nneoma Emezue and Bunmi Akinremi and David Adelani and Chris Pal},
year = {2025},
url = {https://naijavoices.com/}
}
- Downloads last month
- -
Model tree for samuelolubukun/chatterbox-hausa-naijavoices
Base model
ResembleAI/chatterbox
# pip install chatterbox-tts import torchaudio as ta from chatterbox.tts import ChatterboxTTS model = ChatterboxTTS.from_pretrained(device="cuda") text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill." wav = model.generate(text) ta.save("test-1.wav", wav, model.sr) # If you want to synthesize with a different voice, specify the audio prompt AUDIO_PROMPT_PATH="YOUR_FILE.wav" wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH) ta.save("test-2.wav", wav, model.sr)