Logo Lanfrica

michsethowusu/nano-twi

Domaine:

natural language processing

Type de record:

modelsoftware
Créateur:
mic
Hôte:
Fast offline Asante Twi TTS with Python/web/mobile support. # nano-twi Fast, **offline** Asante Twi text-to-speech that runs anywhere — Python, web (WASM), and mobile (Android/iOS) — powered by sherpa-onnx. - **Acoustic model:** Matcha-TTS (epoch 45), finetuned from English LJSpeech, phonemized with the espeak-ng `lfn` voice. - **Vocoder:** Vocos universal (≈26× faster than HiFi-GAN on CPU). - **Runtime:** sherpa-onnx — CPU, ~2× realtime, no PyTorch. Single voice (no cloning). - **Long-text robustness:** because Matcha is **non-autoregressive**, it stays stable and natural across **whole paragraphs** — no drift, repeats, or run-on artifacts that plague autoregressive TTS on long input. **Hear it on paragraph-length (8–35 sentence) Twi samples in the live demo.** **Live demo (incl. long-text samples):** huggingface.co **Model files:** huggingface.co (folder `sherpa-onnx/`) ## What's in the model bundle | File | Role | |------|------| | `twi_ep045_steps4.onnx` | Matcha acoustic model — **default**, 4 ODE steps (~4× realtime on CPU), best quality | | `twi_ep045_steps2.onnx` | Matcha acoustic model — **fast** option, 2 ODE steps (~11× realtime), *some quality loss* | | `vocos-22khz-univ.onnx` | Vocos vocoder (mel → audio) | | `tokens.txt` | phoneme → id table | | `espeak-ng-data/` | espeak-ng data incl. the `lfn` voice (phonemization) | **Which acoustic model?** Use `twi_ep045_steps4.onnx` by default. Switch to `twi_ep045_steps2.onnx` when you need maximum speed / lowest latency (e.g. on weak devices) and can accept a small drop in clarity. Everything else (vocoder, tokens, espeak data) is shared — just swap the `--matcha-acoustic-model`. ## Quick start (no clone, no special tools) Inference needs just **one** pip package — `sherpa-onnx`. The model is a single `curl` + `tar`. ```bash # 1. install (only sherpa-onnx) pip install -U sherpa-onnx # 2. download + unzip the model bundle (from GitHub Releases) curl -L -o nano-twi.zip github.co