speech_recognition icon indicating copy to clipboard operation
speech_recognition copied to clipboard

Activate, cancel stop lifecycle

Open cameronsoftware opened this issue 6 years ago • 1 comments

First of all, Thanks very much for doing this work and helping others.

I am trying to understand the "optimal" use of the library. In my app, there really is only one screen, and as long as my app is open, there is a button, ready for speech recognition.

When is it best to register callback handlers and then call activate()? On app startup, or when the user presses the UI button for speech recognition?

What is the difference between cancel and stop?

If I call stop or cancel will I have to re-call activate() again? Or just call listen() again.

thanks for the help.

cameronsoftware avatar May 15 '19 18:05 cameronsoftware

I've noticed that both cancel and stop both result in the plugin invoking the availabilityHandler with returning a result of false. I'm not sure why it has to be activated again, but it does. We need a state that's the same as it is when it automatically stops listening

ThinkDigitalSoftware avatar Nov 19 '19 00:11 ThinkDigitalSoftware