name English (Ghana)
language en-gh
language en 10

maintainer GhanaNLP
status testing

phonemes en
dictrules 3
stressLength 160 150  180 180  0 0  240 280

// The lexicon decides pronunciation. These rules may not contradict it.
//
// `replace` fires on every word, so a rule whose source is a phoneme our own
// dictionary entries can emit silently overwrites what the lexicon said. An
// earlier version of this file collapsed E to e, O: to o, I to i and @ to a --
// which is to say it overrode the lexicon's ɛ, ɔ, ɪ and ə on every word it knew,
// flattening Okuapɛnhɛnɛ to /okwapenhene/ and turning `the` into /da/ while the
// lexicon plainly says [ð, ə]. If a word comes out wrong now, the fix belongs in
// the lexicon. tests/test_espeak_voice.py enforces this.
//
// Three rules touch words the lexicon knows, and none of them changes a phoneme
// it chose:

replace 00 t# t   // espeak flaps /t/ between vowels *after* dictionary lookup, so
                  // this restores what the entry said: Achimota, meeting, citing.
replace 00 r  *   // the lexicon writes /r/; espeak's English `r` is the approximant
                  // ɹ and `*` is the tap. The tap is the nearer reading of /r/.
replace 00 A: a   // not an accent rule: a table translation. mnemonics.py writes
                  // Ghanaian /a/ as `A:` because it targets the American inventory,
                  // where plain `a` is /æ/. This voice reads those entries with the
                  // British table, where `a` is /a/ -- so both spellings mean the
                  // lexicon's /a/, and this reconciles them. It also removes
                  // espeak's intrusive r, which `A:` before a vowel triggers
                  // ('Achimota and' -> /atʃimotaɹ and/) and which is inserted too
                  // late for any rule to delete.

// The rest apply only to words the lexicon has never seen: every source below is
// a phoneme our entries cannot emit, so no entry can be affected by them.

replace 00 @2 a
replace 00 a# a
replace 00 aa a   // bath, trap
replace 00 O2 o
replace 00 oU o   // GOAT monophthong
replace 00 @U o
replace 00 I2 i
replace 00 eI e   // FACE monophthong

formant 1  98  100 100
formant 2  98  100 100
