Hausa text- to speech model
# ποΈ Hausa Text-to-Speech β Fine-Tuning SpeechT5
**Course:** COEN 543 β Natural Language Processing
**Institution:** Ahmadu Bello University, Zaria, Nigeria
**Group:** Group 1
Fine-tuning `microsoft/speecht5_tts` on the Mozilla Common Voice 25.0 Hausa dataset to produce intelligible Hausa speech from a model originally trained only on English.
---
## Demo
> *Before vs. After comparison β run Phase 9 of the notebook to launch a live Gradio interface.*
---
## Project Structure
```
hausa-tts-coen543/
βββ nlp-group1-tts.ipynb # Full pipeline notebook (Phases 1β9)
βββ results/ # Output charts saved during evaluation
β βββ spectrogram_comparison.png
β βββ mcd_comparison.png
β βββ cer_comparison.png
βββ assets/ # Any supplementary images / diagrams
```
---
## Notebook Phases
| Phase | Content |
|-------|---------|
| 1 | Installation & imports |
| 2 | Dataset loading & exploratory analysis |
| 3 | Audio preprocessing pipeline |
| 4 | Baseline inference (before fine-tuning) |
| 5 | Dataset preparation & data collation |
| 6 | Fine-tuning loop |
| 7 | Evaluation: CER, MCD, before-vs-after spectrogram |
| 8 | Standalone inference cell |
| 9 | Gradio before-vs-after demo |
---
## Custom Contributions
Four modifications over the vanilla SpeechT5 fine-tuning recipe:
1. **Amplitude normalisation** β Peak-normalises each waveform to `[-1, 1]` before feature extraction, removing speaker volume as a confounding factor.
2. **Reduction-factor label trimming** β Trims padded mel-spectrogram targets to match the model's reduction factor, preventing loss spikes from dummy frames.
3. **Combined TSV splits** β Merges `validated`, `other`, and `invalidated` TSVs (deduplicated on clip path) to maximise training data (~10 k+ samples instead of the validated-only ~8 k).
4. **Warm-up learning rate schedule** β 500-step linear warm-up before a linear decay, stabilising early training on the low-resource Hausa data.
---
## Dataset
Mozilla Comm β¦