HanwaTTS

HanwaTTS is a Hausa Text-to-Speech (TTS) model fine-tuned from Microsoft's microsoft/speecht5_tts architecture for Hausa speech synthesis.

The model is designed for Hausa-language speech generation and low-resource African-language speech research.

Model Overview

Property Value
Model HanwaTTS
Architecture SpeechT5
Base model microsoft/speecht5_tts
Language Hausa (ha)
Task Text-to-Speech
Sample rate 16 kHz
Speaker embedding dimension 512
Training samples 3,572 paired Hausa text/audio samples
Evaluation samples 684
WER 0.2352
CER 0.0354
Text/phonetic processing Epitran hau-Latn
Vocoder microsoft/speecht5_hifigan

Important — input format. HanwaTTS was trained on Epitran hau-Latn phoneme input, not raw Hausa orthography. The bundled demo applies the Epitran front-end automatically. Raw grapheme text will still run, but intelligibility degrades substantially. See Input Format below.

Intended Use

HanwaTTS can be used for:

  • Hausa conversational AI
  • Voice assistants
  • Educational applications
  • Accessibility applications
  • Hausa content generation
  • Speech research
  • Low-resource language research
  • Prototyping Hausa voice interfaces
  • Multilingual AI systems

The model is intended primarily for research, development, and responsible production applications where appropriate evaluation and human oversight are possible.

Training Data

HanwaTTS was fine-tuned using an internal Hausa speech dataset recorded by Afrilab AI Hub in its own recording studio.

The training set contained:

  • 3,572 paired Hausa text/audio samples
  • Hausa speech recordings
  • Corresponding text transcriptions

Epitran with the hau-Latn configuration was used as part of the text/phonetic processing pipeline.

The underlying recordings are not redistributed as part of this repository.

Training

HanwaTTS is based on the SpeechT5 text-to-speech architecture.

The fine-tuning process adapted the pretrained SpeechT5 model to Hausa speech using paired Hausa text and speech data.

The model uses 512-dimensional speaker embeddings during inference.

Evaluation

The model was evaluated on a held-out set of 684 samples.

The reported ASR-based evaluation results were:

Metric Result
WER 0.2352
CER 0.0354

These metrics are based on automatic speech recognition evaluation and should not be interpreted as direct measurements of human-perceived naturalness, speaker similarity, or overall speech quality.

Independent reproduction (2026)

On the same 684-sentence held-out set, with the shipped checkpoint and the Epitran front-end, an independent re-evaluation using the Axiveri/NaijaVox-2.0 ASR judge gave:

Metric Result
Corpus WER 0.309
Corpus CER 0.072

Absolute WER/CER values depend strongly on the ASR judge, so the two tables should be compared within, not across, evaluation pipelines.

Actual performance can vary depending on:

  • text length
  • vocabulary
  • names and rare words
  • pronunciation
  • Hausa dialect
  • speaker embedding
  • punctuation
  • numerical expressions
  • inference environment

Input Format (Epitran phonemes)

HanwaTTS consumes Epitran hau-Latn phoneme strings, matching the text processing used during fine-tuning. The demo performs this conversion for you:

import epitran

epi = epitran.Epitran("hau-Latn")
phonemes = epi.transliterate("Assalamu alaikum, ya ya kuke?")
# -> "assalamu alaikum, ja ja kuke?"
processor(text=phonemes, return_tensors="pt")

The model's tokenizer has a 116-token vocabulary that includes the Hausa/IPA symbols produced by Epitran (ɓ ɗ ʃ ʒ ʔ ɽ ɡ ɸ ʲ ...). If you tokenize raw orthography instead, several of these units are never produced and quality drops sharply. Pass --no-epitran to the demo only for controlled experiments, not for normal use.

For numbers, dates and currency it is strongly recommended to expand digits to Hausa words before Epitran (e.g. 2024 -> dubu biyu da ashirin da huÉ—u).

Quick Start

Installation

Clone or download this repository and install the demo dependencies:

pip install -r demo/requirements.txt

PyTorch should be installed according to your hardware and CUDA environment.

Basic Inference

python demo/inference.py \
  --model Afrilab/HanwaTTS \
  --speaker afr_3572 \
  --text "Assalamu alaikum, ya ya kuke?" \
  --output output.wav

The generated audio is written as a 16 kHz mono WAV file.

The demo automatically converts the input text to Epitran hau-Latn phonemes before synthesis (see Input Format above).

Speaker Embeddings

The repository supports two speaker embedding profiles for experimentation.

Speaker Profile 1

afr_3572

Run:

python demo/inference.py \
  --model Afrilab/HanwaTTS \
  --speaker afr_3572 \
  --text "Assalamu alaikum, ya ya kuke?" \
  --output afr_3572.wav

Speaker Profile 2

epitran_num

Run:

python demo/inference.py \
  --model Afrilab/HanwaTTS \
  --speaker epitran_num \
  --text "Assalamu alaikum, ya ya kuke?" \
  --output epitran_num.wav

Both embeddings have the expected SpeechT5 speaker embedding shape:

[1, 512]

The two embeddings are different speaker representations and may produce different voice characteristics during synthesis.

Example Audio

A generated Hausa sample is included in:

examples/hausa_sample_01.wav

The sample demonstrates inference using HanwaTTS with a Hausa sentence.

Example Hausa Text

Additional example sentences are available in:

examples/sample_texts.txt

They include conversational Hausa and examples intended for testing different linguistic patterns.

Using a Local Model

The inference script also supports a local model directory.

For example:

python demo/inference.py \
  --model . \
  --speaker afr_3572 \
  --text "Assalamu alaikum, sunana Abdulmalik." \
  --output local_test.wav

GPU Inference

If CUDA is available, the demo automatically uses the GPU.

To explicitly force CPU inference:

python demo/inference.py \
  --model Afrilab/HanwaTTS \
  --speaker afr_3572 \
  --text "Ina son koyon fasahar kere-kere ta wucin gadi." \
  --output cpu_output.wav \
  --cpu

GPU inference is recommended for faster generation.

Vocoder

HanwaTTS uses the SpeechT5 HiFi-GAN vocoder:

microsoft/speecht5_hifigan

The vocoder is loaded separately during inference.

You can provide another compatible vocoder with:

--vocoder <vocoder-name-or-local-path>

Limitations

HanwaTTS is a low-resource Hausa TTS model and has several limitations.

Dataset size

The model was trained using 3,572 paired samples. This is substantially smaller than datasets commonly used for high-resource speech synthesis.

Dialect coverage

The training data may not represent the full range of Hausa dialects, accents, and regional pronunciation patterns.

Pronunciation

Performance may vary for:

  • uncommon Hausa words
  • names
  • foreign words
  • abbreviations
  • numbers
  • dates
  • monetary expressions
  • unusual punctuation
  • code-switching

Voice characteristics

The provided speaker embeddings represent particular speaker characteristics. They should not be interpreted as representing every Hausa speaker.

Evaluation limitations

The reported WER and CER are automatic evaluation metrics. They do not replace human evaluation of:

  • naturalness
  • pronunciation
  • intelligibility
  • prosody
  • speaker similarity
  • expressiveness

Ethical Considerations

Speech synthesis technology can be used to generate convincing synthetic speech.

Users should:

  • obtain appropriate consent when using identifiable speaker representations
  • disclose synthetic or generated speech when appropriate
  • avoid impersonation and deceptive use
  • avoid presenting generated speech as an authentic recording
  • respect applicable privacy, copyright, and data-protection requirements

The model should not be used to create deceptive recordings of individuals without appropriate authorization.

Data and Speaker Rights

The training recordings used to develop HanwaTTS were recorded by Afrilab AI Hub.

The original training recordings are not included in this repository.

The model license does not automatically grant rights to the underlying recordings, speaker identities, or other source data.

Speaker embeddings should only be redistributed or used where the necessary authorization and rights have been obtained.

Public Speaker Embeddings

Two speaker embeddings are included in the repository for public inference and demonstration:

Profile File Shape
afr_3572 embeddings/afr_3572_speaker_embedding.pt [1, 512]
epitran_num embeddings/epitran_num_speaker_embedding.pt [1, 512]

These speaker embeddings are intentionally distributed as public HanwaTTS project assets and are authorized for redistribution as part of the project.

The original training recordings are not included in the repository.

The embeddings can be selected directly through the demo:

python demo/inference.py \
  --model Afrilab/HanwaTTS \
  --speaker afr_3572 \
  --text "Assalamu alaikum, ya ya kuke?" \
  --output output.wav

or:

python demo/inference.py \
  --model Afrilab/HanwaTTS \
  --speaker epitran_num \
  --text "Assalamu alaikum, ya ya kuke?" \
  --output output.wav

Users should not use the generated speech for impersonation, fraud, deception, or other harmful purposes.

Version History

v2 (repackaged, 2026)

This release replaces the initial upload, which was mis-packaged:

  • The initial repository shipped weights whose tokenizer could not emit the Hausa/IPA symbols (É“ É— ʃ Ê’ ...) the model was trained on, and the demo fed raw grapheme text straight to the processor without the Epitran front-end. The model therefore ran out-of-distribution.
  • v2 ships the correctly matched checkpoint and its 116-token tokenizer (with <BREAK> / <SIL> and Hausa/IPA units), the matching preprocessor_config.json, and an inference script that applies the Epitran hau-Latn front-end.

The model weights in this release differ from the initial upload.

License

The HanwaTTS model and repository are released under the MIT License, subject to the rights and licensing terms of the underlying components.

The base SpeechT5 model used for this work is:

microsoft/speecht5_tts

The licensing status of the model should be considered separately from rights associated with the training recordings and speaker representations.

See LICENSE for the repository license.

Citation

If you use HanwaTTS in research or software, please cite this repository and the original SpeechT5 work.

SpeechT5

@article{ao2021speecht5,
  title={SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing},
  author={Ao, Junyi and Wang, Rui and Zhou, Long and Wei, Shiliang and Ren, Shuo and Peng, Yu and others},
  journal={arXiv preprint arXiv:2110.07205},
  year={2021}
}

HanwaTTS

@misc{hanwatts,
  title={HanwaTTS: Hausa Text-to-Speech Model},
  author={Afrilab AI Hub},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/Afrilab/HanwaTTS}
}

Acknowledgements

HanwaTTS builds on the SpeechT5 architecture and pretrained model developed by Microsoft Research and contributors.

We acknowledge the contribution of Afrilab AI Hub's Hausa speech data collection and research efforts toward developing speech technology for Hausa.

Disclaimer

HanwaTTS is provided for research and development purposes. Generated speech may contain pronunciation, timing, prosody, or other synthesis errors.

Users are responsible for evaluating generated output and ensuring that their use of the model complies with applicable laws, licenses, permissions, and ethical requirements.

Downloads last month
14
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Afrilab/HanwaTTS-v2

Finetuned
(1387)
this model

Paper for Afrilab/HanwaTTS-v2