nano-twi — Asante Twi Text-to-Speech
Fast, offline Asante Twi TTS: a Matcha-TTS acoustic model + Vocos vocoder, exported to ONNX and served with sherpa-onnx. Runs on CPU at several× realtime — desktop, Android, iOS, and web (WASM).
➡️ Full docs, code, and Python / web / mobile examples: https://github.com/michsethowusu/nano-twi 🔊 Live demo: https://huggingface.co/spaces/ghananlpcommunity/nano-twi
Files (sherpa-onnx/)
| File | Role |
|---|---|
twi_ep045_steps4.onnx |
acoustic model — default, 4 ODE steps, best quality |
twi_ep045_steps2.onnx |
acoustic model — fast, 2 ODE steps, lower quality |
vocos-22khz-univ.onnx |
Vocos universal vocoder |
tokens.txt |
phoneme → id table |
espeak-ng-data/ |
espeak-ng lfn-voice data (phonemization) |
Quick start (only needs sherpa-onnx)
pip install -U sherpa-onnx
curl -L -o nano-twi.zip https://github.com/michsethowusu/nano-twi/releases/download/v1.0/nano-twi-sherpa-onnx.zip
unzip nano-twi.zip
curl -O https://raw.githubusercontent.com/michsethowusu/nano-twi/main/examples/python/synthesize.py
python3 synthesize.py --model-dir ./nano-twi \
--text "Awurade ne me hwɛfoɔ, biribiara renhia me." --out twi.wav
# fast model: add --acoustic twi_ep045_steps2.onnx
(Or fetch individual files with hf download ghananlpcommunity/nano-twi --include "sherpa-onnx/*".)
Notes
- Input is Asante Twi text in normal orthography (incl.
ɛ ɔ); phonemized to IPA via espeak-nglfn. - Single voice — not a voice-cloning model.
- Use the bundled
espeak-ng-data/as-is (built with eSpeak NG 1.52.0) and sherpa-onnx ≥ 1.12; swapping in different espeak data can change pronunciation.
How it was built
Finetuned from the English LJSpeech Matcha-TTS checkpoint on the Asante Twi subset of
michsethowusu/ghana-speech, phonemized
with the espeak-ng lfn (Lingua Franca Nova) voice (which maps Twi orthography to clean IPA).
License
MIT. Matcha-TTS, Vocos, sherpa-onnx, and espeak-ng retain their respective licenses.