Logo Lanfrica

GhanaNLP/espeak-ng-twi

Domaine:

natural language processing

Type de record:

software
Créateur:
Gha
Hôte:
Twi (Asante) language files for espeak-ng, generated from ghana-g2p # espeak-ng-twi **Twi (Asante) language files for espeak-ng** — letter-to-phoneme rules generated from ghana-g2p, plus the generator that produced them. > **Status: rules and phoneme table both written and compiling individually; they are not yet > wired together.** `espeak-ng --compile=tw` still reports `Unknown phoneme table: 'tw'`, so Twi > phonemisation does not work end to end yet. See What's left — the remaining > blocker is build wiring, and a native speaker should review the inventory before this goes > upstream. ## Why Twi in espeak-ng matters espeak-ng is the text-to-phoneme front-end for essentially every **native** speech runtime: sherpa-onnx, Piper's C++ binary, and the Android and iOS ports all call it, and none of them can call a Python library. espeak has no Twi. So today anything running Twi TTS off-device has to ship a **fixed pronunciation lexicon** alongside the model — which covers the words it was generated from and silently drops the rest. We hit this directly: a 78,000-word lexicon works, but any word outside it disappears from the audio with only a log line. Adding Twi to espeak fixes that **once, for every consumer**, with unlimited vocabulary. It also makes Twi available to screen readers and any other espeak-based tool, not just one TTS project. ## Why it translates cleanly ghana-g2p's Twi table is **context-free longest-match**: 20 digraphs and 22 single letters, with aspiration carried by the letter itself rather than derived from position. ``` ky -> tɕʰ hy -> ç k -> kʰ i -> ɪ gy -> dʑ hw -> hʷ p -> pʰ ɔ -> ɔ tw -> tɕʷ nw -> nʷ t -> tʰ ɛ -> ɛ ``` That is a one-to-one fit for espeak's `.group` rule format. A language whose pronunciation depended on stress, tone or morphology would not map this directly — Twi's near-phonemic orthography is what makes this tractable. ## What works - **42 rules across 22 groups**, generated and structurally accepted by espeak's rule compiler (`42 ru …