mbrola: Fix portuguese and french voices priorities
- We want to use br* voices in priority for Brazilian Portugues, but not
for general Portuguese.
- We want to use ca* and Belgian voices for Canadian and Belgian French,
but rather not for general French.
The Elvish languages have the same general stress rule as Latin [1]:
stress falls on the penultimate syllable if that is heavy (contains a
long vowel, a diphthong, or a vowel followed by two or more consonants),
otherwise on the antepenultimate syllable. For Latin, espeak-ng
implements this by declaring “penultimate syllable” as the general
stress rule in espeak-ng-data/, and then adding rules in dictsource/
that match light syllables and move the primary stress to the previous
syllable, i.e. the antepenultimate one. We use the same basic principle
for the Elvish languages here (but using the terms “heavy” and “light”
rather than “weak” and “strong” like in the Latin files).
Note that this doesn’t fully implement the stress rules yet: we have no
concept of diphthongs, long vowels aren’t really properly handled yet,
and we also still count ⟨ch⟩, ⟨dh⟩, ⟨th⟩ as two consonants rather than
one as it should be. This will be improved separately (I prefer doing
this in small incremental steps).
[1]: https://menegroth.github.io/stress-in-sindarin.html
This prepares the languages of Quenya and Sindarin, setting up their
infrastructure without declaring a lot of rules yet – just enough for
“Eä” (a Quenya word, but I can’t think of a similarly simple one for
Sindarin). Phonemes are inherited from Esperanto for now.
cmn now handles all latin characters as English.
The old functionality of assuming latin characters are pinyin can be
achieved with new language cmn-Latn-pinyin.
voice fast is related to speed.fast_settings. Others were errors in
LoadVoice() parsing or commented out code.
Note that some voices are from the original espeak and have comments
that might be outdated.
See commit message for 23a4d88f.
This commit fixes cmn and yue.
CalcPitches_Tone() now accepts cmn for translator_name.
SelectTranslator() now has a case for yue instead of zhy.
Option "language <name>"already causes SelectTranslator(<name>) to be
called. Having two options to do almost the same thing is unnecessary
and confusing.
In the long term, all options from SelectTranslator() should have a
switch case in LoadVoice() so they are user configurable (see #218). If
needed, a new option (maybe called "LoadOptions") could be added to load
an existing voice or language file.
Changes language configuration files for: hak, cmn, yue, ltg, ms, mb-ma1.
No changes to users.
Code cleanup: remove param2 from langopts and rename keyword option in language files.
- param2[] is only used to set a second value to LOPT_BRACKET_PAUSE. It is simpler
to have two values in param[] instead. This simplifies the codebase.
- Instead of setting "option bracket X Y" in language files, use
keywords "brackets X" and "bracketsAnnounced Y" instead to follow the
naming convention of other keywords.
- Add missing documentation to docs/voices.md.