JamesBrill / react-speech-recognition

💬Speech recognition for your React app
https://webspeechrecognition.com/
MIT License
645 stars 116 forks source link

stop is not working using polyfill for azure speech services #120

Closed pfloresl closed 1 year ago

pfloresl commented 2 years ago

when stop is called, the red icon on chrome tab stays on. "microsoft-cognitiveservices-speech-sdk": "^1.17.0", "web-speech-cognitive-services": "^7.1.1

my sequence to stop

SpeechRecognition.stopListening();

abortlListening does remove red icon.

thank you

Also confuse on doc mentioning that it is async. await seems not be supported.

JamesBrill commented 2 years ago

Hi @pfloresl thanks for raising the issue. stopListening only became async in version 3.3.0 - try updating your installed version to get that functionality.

I'll play with the Azure polyfill and see if I also have difficulties stopping the microphone. Which browser are you using?

JamesBrill commented 2 years ago

@pfloresl This appears to be a bug in the Azure polyfill. I have raised an issue with the author. In the meantime, abortListening should get you the behaviour you desire.