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.
stopListening
andabortListening
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.