Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

michsethowusu/fast-ghana-voice

Domain:

natural language processing

Record type:

softwaremodel
Creator:
mic
Host:
Offline Twi/Ewe/Dagbani text-to-speech on ONNX Runtime (no PyTorch). ~14-20x realtime on CPU. # Fast Ghana Voice 🗣️🇬🇭 **Offline Twi / Ewe / Dagbani text-to-speech on ONNX Runtime — no PyTorch.** ▶️ **Try the live demo:** Fast Ghana Voice on Hugging Face Spaces (runs the same full ONNX pipeline on CPU). Lightweight (`onnxruntime + numpy + soundfile`), fast on CPU, and fully offline after the first model download. Built from a StableTTS flow-matching model finetuned on the GhanaNLP Bible dataset, exported to ONNX (text encoder + duration + flow-matching decoder baked into one acoustic graph; a 44.1 kHz Vocos vocoder with a real-op iSTFT). ## Install ```bash pip install fast-ghana-voice # or from source: pip install git+github.com ``` ## Usage ### Python ```python from fast_ghana_voice import FastGhanaVoice tts = FastGhanaVoice() # downloads + caches ONNX models on first run wav, sr = tts.synthesize("Awurade ne me hwɛfo.", language="twi") tts.save("out.wav", wav, sr) ``` ### Command line ```bash fast-ghana-voice "Naawuni n-nyɛ n lana." --language dagbani -o out.wav ``` Languages: `twi`, `ewe`, `dagbani` (each is a distinct baked voice). ### Fully offline Download the model files once (`model-steps-4.onnx`, `vocos.onnx`, `tokens.txt` from the model repo) into a folder, then point the library at it — no network needed: ```python tts = FastGhanaVoice(model_dir="./models") ``` ## Knobs - `length_scale` — `>1` slower, `<1` faster speech. - `noise_scale` — sampling temperature (default 0.667). - `steps` — baked ODE-solver steps variant (default 4; more steps = smoother, slightly slower). ## How it works 1. **Tokenizer** (pure Python): text → grapheme characters → ids → blank-interspersed. 2. **Acoustic ONNX** (`model-steps-N.onnx`): tokens + speaker id → mel. The text encoder, duration predictor, length regulation, and the euler ODE loop are all baked in. 3. **Vocoder ONNX** (`vocos.onnx`): mel → 44.1 kHz waveform (Vocos; the complex iSTFT was reimplemented with real ops so it runs in ONNX …

Visit

github.com

Tasks

text to speechspeech processing

Languages

AkanBwamu, CwiDagbaniDinka, SoutheasternÉwéTwi

Licenses

Apache-2.0

Similar

michsethowusu/ghana-voice-samplesGhanaNLP/ghana-voice-builderChristorious/ghana-voice-ledgermichsethowusu/ghana-speechmichsethowusu/ghana-farmer-qamichsethowusu/ghana-health-symptoms

michsethowusu/ghana-voice-samples

GhanaNLP/ghana-voice-builder

Finetune a multilingual Ghanaian-language TTS base model on a small dataset — 42 languages, clone-an

Christorious/ghana-voice-ledger

Voice-powered transaction ledger for Ghanaian small businesses # Voice Ledger Ghana A voice-powere

michsethowusu/ghana-speech

Language Subset Segments Duration Akuapem_Twi Akuapem_Twi_twi 52,650 63.25h Anyin Anyin_any 13,986

michsethowusu/ghana-farmer-qa

# Ghana Farmer QA A pipeline that turns **YouTube videos of Ghanaian farmers talking about their wo

michsethowusu/ghana-health-symptoms

Twi patient symptom descriptions with fine-grained English triage tags, generated from Ghanaian heal