XTTS-v2 Hausa (OpenBibleTTS 8-Epoch Fine-Tune)
This repository provides fine-tuned weights, extended tokenizer vocabulary, and configuration files for Coqui XTTS-v2 fine-tuned on Hausa (ha) speech from the OpenBible dataset.
The model extends XTTS-v2's multilingual voice-cloning capabilities to Hausa, maintaining conditioning latents, speaker cloning fidelity, and cross-lingual transfer from a reference audio clip (3 to 10 seconds).
Model Summary
- Base Architecture: Coqui XTTS-v2 (Autoregressive GPT text/mel encoder + Discrete VAE spectrogram vocoder)
- Parameters: 521.8M
- Target Language: Hausa (
ha) - Tokenizer: Extended Byte Pair Encoding (BPE) with special language tag
[ha](token index6681) - Dataset:
multilingual-tts/open-bible(Hausa split) - Training Samples: 8,000 paired audio-text samples (resampled to 22,050 Hz)
- 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 and MultiStep scheduling (learning rate = 5e-6, effective batch size = 8):

Epoch Progression Table
| Epoch | Global Step | Train Loss | Train Text CE | Train Mel CE | Eval Total Loss | Eval Text CE | Eval Mel CE |
|---|---|---|---|---|---|---|---|
| 0 (Start) | 0 | 0.8212 | 0.2383 | 3.0465 | — | — | — |
| Epoch 1 | 3,920 | 0.5448 | 0.0482 | 2.2104 | 2.4273 | 0.0448 | 2.3825 |
| Epoch 2 | 7,840 | 0.5312 | 0.0410 | 2.1802 | 2.2962 | 0.0383 | 2.2579 |
| Epoch 3 | 11,760 | 0.5240 | 0.0365 | 2.1480 | 2.2272 | 0.0356 | 2.1915 |
| Epoch 4 | 15,680 | 0.5185 | 0.0342 | 2.1221 | 2.1875 | 0.0339 | 2.1536 |
| Epoch 5 | 19,600 | 0.5120 | 0.0328 | 2.0954 | 2.1536 | 0.0327 | 2.1209 |
| Epoch 6 | 23,520 | 0.5052 | 0.0317 | 2.0680 | 2.1307 | 0.0318 | 2.0989 |
| Epoch 7 | 27,440 | 0.4981 | 0.0308 | 2.0415 | 2.1169 | 0.0311 | 2.0858 |
| Epoch 8 (Final) | 31,360 | 0.4769 | 0.0294 | 2.0128 | 2.1034 | 0.0305 | 2.0729 |
Key Metric Takeaways
- Text Cross-Entropy Loss decreased from 0.2383 to 0.0294 (87.6% reduction), confirming stable phonetic alignment to Hausa orthography.
- Mel Spectrogram Loss converged from 3.0465 to 2.0128 (33.9% reduction), sharpening voice clarity and reducing synthetic acoustic artifacts.
- Validation Loss showed monotonic decrease across every epoch without overfitting.
Audio Comparison: Original vs. XTTS Cloned Synthesis
Below is a side-by-side comparison between the reference speakers and the speech synthesized by this fine-tuned model.
All three reference audios are sourced from the benjaminogbonna/nigerian_common_voice_dataset (Hausa split) by Benjamin Ogbonna:
- Samples 1 & 2: Zero-shot voice cloning reproducing each speaker's own voice and words.
- Sample 3: Cross-speaker voice transfer, synthesizing speech from a distinct OpenBible training narrator voice on an utterance spoken by a Ben Ogbonna Common Voice speaker.
Sample 1: "Bude kofar. Na san kina ciki."
| Original Reference (Ben Ogbonna Dataset) | XTTS-v2 Cloned Synthesis |
|---|---|
Sample 2: "Na ga wani aikin dabba mai ban mamaki a circus"
| Original Reference (Ben Ogbonna Dataset) | XTTS-v2 Cloned Synthesis |
|---|---|
Sample 3: "Nagode da yadda ka ƙona mini riga ta da sigarin ka."
| Original Reference (Ben Ogbonna Dataset) | XTTS-v2 Cloned Synthesis (OpenBible Voice Clone - Different Voice) |
|---|---|
Repository Files
This repository contains all files necessary to run standalone synthesis or merge with standard Coqui pipelines:
| File | Description |
|---|---|
model.pth | Fine-tuned GPT decoder weights (best_model_31360.pth) |
config.json | Updated model configuration with ha language enabled and local paths |
vocab.json | Extended BPE tokenizer vocabulary |
dvae.pth | Discrete VAE acoustic spectrogram decoder |
mel_stats.pth | Mel spectrogram normalization statistics |
sample_synthesis.wav | Audio generated from the final epoch checkpoint (24,000 Hz) |
training_curves.png | High-resolution convergence graphs |
How to Use
Ensure coqui-tts and dependencies are installed:
pip install coqui-tts "transformers<4.45.0" torch torchaudio huggingface_hub
Load the model and synthesize speech directly from this Hugging Face repository:
import os
import re
import torch
import torchaudio
from huggingface_hub import snapshot_download
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
# 1. Download model repository
model_dir = snapshot_download(repo_id="samuelolubukun/xtts-v2-hausa-openbible")
# 2. Load model config and checkpoint
config = XttsConfig()
config.load_json(os.path.join(model_dir, "config.json"))
model = Xtts.init_from_config(config)
model.load_checkpoint(
config,
checkpoint_path=os.path.join(model_dir, "model.pth"),
vocab_path=os.path.join(model_dir, "vocab.json"),
use_deepspeed=False
)
model.cuda() if torch.cuda.is_available() else model.cpu()
# 3. Text cleaner fallback for custom language support
orig_preprocess = model.tokenizer.preprocess_text
def safe_preprocess_text(txt, lang):
try:
return orig_preprocess(txt, lang)
except NotImplementedError:
txt = txt.lower()
return re.sub(r"\s+", " ", txt).strip()
model.tokenizer.preprocess_text = safe_preprocess_text
# 4. Compute speaker conditioning latents (using bundled reference audio or your own 3-10s WAV)
ref_audio = os.path.join(model_dir, "samples/sample1_original.mp3")
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(
audio_path=ref_audio,
gpt_cond_len=30,
max_ref_length=30,
sound_norm_refs=False,
)
# 5. Synthesize speech
text = "Barka da yamma, yaya kuke? Wannan muryar an horar da ita ne da harshen Hausa."
out = model.inference(
text=text,
language="ha",
gpt_cond_latent=gpt_cond_latent,
speaker_embedding=speaker_embedding,
temperature=0.3,
length_penalty=1.0,
repetition_penalty=5.0,
top_k=30,
top_p=0.85,
)
# 6. Save output audio (24,000 Hz)
torchaudio.save("output_ha.wav", torch.tensor(out["wav"]).unsqueeze(0), 24000)
print("Saved synthesized speech to output_ha.wav")
Limitations and Ethical Usage
- Domain & Register Bias: Trained on read, scripture-domain speech characterized by a narrow theological vocabulary and a formal liturgical register. As a consequence, the model may not transfer out-of-the-box with natural prosody to informal or fast-paced conversational speech.
- Dataset Labels: Speaker labels and forced segment alignments in the upstream OpenBibleTTS dataset were generated automatically and may contain slight boundary inconsistencies.
- 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.
- Licensing: Inherits the Coqui Public Model License / MRCUL.
Author & Attribution
Developed and fine-tuned by Samuel Olubukun:
- Website: samuelolubukun.com
- GitHub: @samolubukun
- Hugging Face: @samuelolubukun
Citation
If you use this model or checkpoints in your research, applications, or benchmarks, please cite:
@misc{olubukun2026xttshausa,
author = {Samuel Olubukun},
title = {XTTS-v2 Hausa: 8-Epoch Fine-Tuning on OpenBibleTTS},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/samuelolubukun/xtts-v2-hausa-openbible}}
}