One-letter words repeated more than three times lose their phonemes
Within one clause, a one-letter word repeated more than three times in a row loses every repeat after the third. Symbols are meant to be limited this way ($max3), but letters are caught too.
$ espeak-ng -q -v en-us --ipa "b b b b b b"
bˈiː bˈiː bˈiː
$ espeak-ng -q -v en-us --ipa "I I I I I I"
aɪ aɪ ˈaɪ
$ espeak-ng -q -v en-us --ipa "go go go go go go"
ɡˌoʊ ɡˌoʊ ɡˌoʊ ɡˌoʊ ɡˌoʊ ɡˈoʊMixed case counts as a repeat (B b B b B b), and so do multi-word entries keyed on
a single letter, e.g. (I am): "I am" × 6 is read four times.
Cause
At the end of LookupDict2() (src/libespeak-ng/dictionary.c), a found one-character
entry gets FLAG_MAX3 when that character is not alphabetic:
ix = utf8_in(&c, word);
if (flags != NULL && (word[ix] == 0) && !IsAlpha(c))
flags[0] |= FLAG_MAX3;By then word may already have been transposed. For Latin languages
transpose_min is 0x60, so a letter such as b has become a compressed code
that IsAlpha() rejects. Every one-letter dictionary entry is therefore flagged,
and LookupDictList() empties the phonemes from the fourth identical repeat on.
Version
Reproduced on master (699e796), 1.51 and 1.50.
AI Usage Disclosure
This issue was investigated with assistance from Claude (Anthropic). The findings were reviewed and verified by the author.
Source: espeak-ng/espeak-ng