pbakondy / cordova-plugin-speechrecognition

:microphone: Cordova Plugin for Speech Recognition
MIT License
197 stars 117 forks source link

Starting again the recognition fails on Android #49

Open zamrokk opened 6 years ago

zamrokk commented 6 years ago

I have problem of ERROR_RECOGNIZER_BUSY or prompt paused on "Try again" once I got my first results and I call .startListening() again. I am using Ionic 2, but it is exactly the same using directly the cordova plugin.

I think you should manage better this kind of errors, here is what I found to solve this kind of issues : https://stackoverflow.com/questions/13227105/speechrecognizer-not-connected-to-recognition-service https://stackoverflow.com/questions/15759676/handling-recognitionlistener-errors

I would do :

sr.stopListening();
sr.cancel();
sr.destroy();
sr.startListening();

to be sure all is back again

For the moment, my work is stuck. no other workaround found

hazaveh commented 6 years ago

I'm having the same issue. I believe this did not exist in earlier version. when I updated the plugin when i try to call it instantly after it's done with the recognition it give me "a recognizer busy" too, and I'm stuck!