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

Caster fails to load with windows speech recognition engine #305

Closed
LexiconCode opened this issue Oct 26, 2018 · 9 comments
Closed

Caster fails to load with windows speech recognition engine #305

LexiconCode opened this issue Oct 26, 2018 · 9 comments
Assignees
Labels
Bug Unexpected behavior from existing features. Windows Speech Recognition Windows Speech Recognition Backend

Comments

@LexiconCode
Copy link
Member

Caster fails to load with windows speech recognition engine. Using latest development branch and dragonfly 0.8.0
All applications failed to load similar to 'vscode'. and 'Attempting to load Caster ' continues indefinitely.

Truncated log

Ignoring application 'vscode'. Failed to load with:
(-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147200940), None)
(1) Attempting to load Caster -- WSR not loaded and listening yet...
(2) Attempting to load Caster -- WSR not loaded and listening yet...

Confirmation needed to label as a bug. Please test.
Simply close out Dragon NaturallySpeaking and double-click on _caster.py

@comodoro
Copy link
Contributor

I can confirm: WSR starts turned off, applications fail to load and the Attempting to load Caster continues without user intervention. If I manually turn WSR on, it seems to start all right, but it has to be done really quickly before apps start to load.

@LexiconCode LexiconCode added Bug Unexpected behavior from existing features. Windows Speech Recognition Windows Speech Recognition Backend labels Oct 26, 2018
@comodoro
Copy link
Contributor

It seems doable to delay application load until user clicks the WSR button, but is this really the intended behavior? Should or shouldn't Dragonfly launch WSR without user intervention?

@LexiconCode
Copy link
Member Author

It seems doable to delay application load until user clicks the WSR button, but is this really the intended behavior? Should or shouldn't Dragonfly launch WSR without user intervention?

It is intended to launch WSR without user intervention. A mechanism is in place already to load when WSR is available which needs to be debugged.

@LexiconCode
Copy link
Member Author

LexiconCode commented Nov 12, 2018

@comodoro According to my testing I believe this issue has been fixed by dictation-toolbox/dragonfly@6d78fdd which is a fix for dictation-toolbox/dragonfly#25

if you're willing to help test download from github the latest dragonfly repository and run from CMD or powershell python setup.py install.

Well I take that back nevermind 5/6 tests it worked on the 6th of same error occurs.

@comodoro
Copy link
Contributor

I can confirm now that it still does not work:) Thought actually that the problem might be on my side.

By the way, does the line https://github.com/synkarius/caster/blob/0c03ae2ab81fceb1c4421f2cf3e9cc6729a1ef43/_caster.py#L19 actually load all apps, not just firefox, because of init.py in apps? I cannot explain what i see in the console otherwise. Same goes for https://github.com/synkarius/caster/blob/0c03ae2ab81fceb1c4421f2cf3e9cc6729a1ef43/_caster.py#L12 and ccr rules.

@LexiconCode
Copy link
Member Author

@comodoro I can confirm the bug is not within caster. The issue is somewhere within dragonfly. See dictation-toolbox/dragonfly#41

The issue can be reproduced with sample.py which is a pure dragonfly implementation. On my machine the bug seems to be intermittent.

@LexiconCode
Copy link
Member Author

I would have to look into that but I think you're correct about the init.py

@drmfinlay
Copy link
Member

Okay I've done a bit more looking into this. I still don't know how to fix it, but I noticed it also occurs with the original version of dragonfly. I don't think I'm familiar enough with Microsoft's Speech API to actually fix this. It could be specific to certain versions of Windows if no one has reported it before.

As @comodoro suggested on Gitter, we could just swap to using the Sapi5InProcEngine class. I get the sense from the old dragonfly issue on the topic that the class was supposed to replace the shared instance class anyway.

Given that there is no UI if Sapi5InProcEngine is used, I was thinking that a RecognitionObserver could print recognition results so there is at least some user feedback. The engine would need to be modified to notify observers of spoken words for that to work.

@LexiconCode
Copy link
Member Author

LexiconCode commented Jan 30, 2019

The bug is related to WSR Engine not the dragonfly implementation. A workaround now utilizes SAPI 5's in-process engine class is the default in dragonfly v0.11.0.

@LexiconCode LexiconCode removed the Dragonfly A catchall label for issues related to Dragonfly label Jan 30, 2019
@LexiconCode LexiconCode self-assigned this Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected behavior from existing features. Windows Speech Recognition Windows Speech Recognition Backend
Projects
None yet
Development

No branches or pull requests

3 participants