JamesBrill / react-speech-recognition

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

Async stopListening #68

Closed JamesBrill closed 3 years ago

JamesBrill commented 3 years ago

stopListening and abortListening were previously synchronous functions, but the internal function for turning off the microphone is asynchronous. This made it impossible for consumers to wait for the microphone to be turned off. This PR addresses that, making these functions asynchronous and wait for the microphone to be turned off before returning.