code cleanup: Check all local includes with include-what-you-use
Going through files in src/libespeak-ng/, include-what-you-use removed a
few unnecessary includes and included explanations on why a certain
header should be included. This makes tracking globals and dependencies easier.
Running the codebase through IWYU should be repeated after each major
code restIncludes to standard c library weren't checked to avoid
breaking builds with other platforms.
See https://github.com/include-what-you-use/include-what-you-use
code cleanup: remove unused int vowel_transition[4]
There's two variables with the same name:
1) in struct PHONEME_DATA, used by *phdata, *phdata_next and *phdata_prev
2) an unnecessary one that's only being memset() twice but never used
for anything
code cleanup: change global int current_phoneme table to static
It's only used in SpeakNextClause() and related to SelectPhonemeTable().
Another solution void be to keep SelectPhonemeTable() as a void function
and do a current_phoneme_table = voice->phoneme_tab_ix after the call to
SelectPhonemeTable().
code cleanup: pass voice_t wvoice as a parameter instead of using a global
SetSynth_Klatt() was using wvoice in two ways:
1) global wvoice was used directly
2) global wvoice was also passed in Wavegen_Klatt() as an argument "v"
Now the code only uses the function argument wvoice
Contributes to #68.
cmn: use voiceless uvular fricative as pronounciation of pinyin h
According to [1] and [2] , the pronounciation of the pinyin character
h is not accurately [x].
According to [2], [χ] is instead a possible pronounication in young
users.
As a young native speaker of Mandarin, I feel the sound of [χ] in espeak
more satisfied than [x] here.
[1] https://en.wikipedia.org/wiki/Standard_Chinese_phonology
[2] https://phesoca.com/aws/268/
Signed-off-by: Icenowy Zheng <[email protected]>
This item will lead `冉冉` to be pronounced 3 times rather than 2, and
it's not necessary because this character has no overloaded
pronounciation.
Signed-off-by: Icenowy Zheng <[email protected]>