Fix compilation of espeak dictionary for language zhy#12370
Conversation
This comment has been minimized.
This comment has been minimized.
|
cc @kara-louise |
|
Rather than determining the names of languages from files, it is probably better to explicitly list the expected languages, input files, and output files and any other settings that may be required. As a next step on this PR I'll update espeak and add an explicit mapping. |
When compiling dicts for espeak, use an explicit list rather than a glob. Using glob makes it hard to track added / or removed languages
43500cf to
c63cc7a
Compare
seanbudd
left a comment
There was a problem hiding this comment.
I've confirmed that Mandarin and Cantonese are included and work as voices for eSpeak. The change of strategy looks good and makes the code a lot easier to understand, but I left some minor suggestions.
|
@seanbudd I have made those changes, also added a note about dictionary compilation to the espeak docs. Looking at this again, it might be a mistake that we don't list all inputs to the dictionary compilation. As it currently stands, SCons will only recompile the dictionary if the |
Is this still a pending issue then? Otherwise, the changes look good. |
|
I think it is best if I update it further. |
seanbudd
left a comment
There was a problem hiding this comment.
Changes look good, pending your thoughts on how to generate the dictionary
Link to issue number:
Fixes: #10418
Summary of the issue:
Compiling the zhy dictionary has failed for a long time, it was excluded because the cause was unknown.
It was suspected that there was an error in the format of the files.
Looking into this I found the issue was caused by trying to set the voice to "zhy" by calling
espeak_SetVoiceByProperties.The result was
2(ENS_VOICE_NOT_FOUND)Compilation was based on using glob to find the
*_rulesfiles, and splitting the filename to get the language to use for the voice.Description of how this pull request fixes the issue:
After getting advice from espeak-ng devs source files for compiling dictionaries in espeak have been updated.
This change makes the compilation of espeak dictionaries more explicit.
An explicit listing of the dictionaries NVDA expects (rather than using glob), allows us to be aware of the introduction or removal of languages.
Links that might help reviewers:
espeak_SetVoiceByPropertiesinespeak-ng/speak_lib.hinespeak-ng/espeak_ng.h`espeak_ERRORenumespeak_ng_STATUSenumTesting strategy:
Tested building and running with espeak voice set to Chinese(Cantonese)
Ask alpha users more familiar with this language to test.
Known issues with pull request:
None
Change log entries:
Bug fixes
- eSpeak Cantonese and Mandarin voices are now available again.Code Review Checklist: