Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to ESpeak when OneCore fails to initialize #11544

Closed
XLTechie opened this issue Sep 2, 2020 · 3 comments · Fixed by #12647
Closed

Fallback to ESpeak when OneCore fails to initialize #11544

XLTechie opened this issue Sep 2, 2020 · 3 comments · Fixed by #12647
Assignees
Milestone

Comments

@XLTechie
Copy link
Contributor

XLTechie commented Sep 2, 2020

Is your feature request related to a problem? Please describe.

If OneCore fails to initialize or work, Windows 10 can be left with no speech during/after an NVDA install.
This was recently demonstrated in issue #11543 .

Describe the solution you'd like

As @lukaszgo1 mentioned in a comment on that issue, we could fallback to ESpeak if OneCore fails for any reason during the initialization phase.

I would add, that showing a dialog informing the user that this is not the preferred speech synth for Windows 10, but that something went wrong and they should ask for help or whatever, might be a good idea.

Describe alternatives you've considered

Keeping things as they are, in which case no speech is the effect, leading to user confusion in these admittedly rare circumstances.

Additional context

At least in the case of the referenced issue, the error produced was:

INFO - core.main (13:14:45.783) - MainThread (14780):
NVDA initialized
ERROR - NVDAHelperLocal (13:14:46.008) - Dummy-1 (15948):
Thread 15948, build\x86\localWin10\oneCoreSpeech.cpp, ocSpeech_speak::<lambda_588a06e8c661fd02fa72cad965a4a6be>::operator (), 98:
Error -2147221164: Class not registered
Class not registered
ERROR - unhandled exception (13:14:46.008) - Dummy-1 (15948):
Traceback (most recent call last):
File "ctypes/callbacks.c", line 232, in 'calling callback function'
File "synthDrivers\oneCore.pyc", line 331, in callback
File "synthDrivers\oneCore.pyc", line 301, in processQueue
AttributeError: 'NoneType' object has no attribute 'sync'
@LeonarddeR
Copy link
Collaborator

Interesting. This should have been fixed as part of #9025

@XLTechie
Copy link
Contributor Author

XLTechie commented Sep 3, 2020 via email

@Brian1Gaff
Copy link

Brian1Gaff commented Sep 3, 2020 via email

@seanbudd seanbudd self-assigned this Jul 14, 2021
seanbudd added a commit that referenced this issue Jul 29, 2021
Fixes #10451 and fixes #11544

Summary of the issue:
#10451
OneCore voices silently fail when attempting to speak an alphabet they don't support (eg an English voice reading Cyrillic characters). This makes installing NVDA for the first time for the first time inaccessible if someone is using a system with a language that isn't supported by their OneCore installed voices.

#11544
An issue was raised on #11543 where oneCore failed to initialise, causing all speech to fail.
If no speech succeeds, the _player is never set and so a subsequent error is thrown in _processQueue.

Description of how this pull request fixes the issue:
#10451
When picking a synthesizer automatically (using "auto", ie not overriden by a user), fail if the current NVDA language and current system language is not supported by installed OneCore voices.

#11544
If oneCore fails to speak more than N=5 times in a row, try the next synth on the synth priority list.
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants