I have a button in my app to start/stop the microphone speech to text process. On Android specifically, once the user stops speaking for a short period of time, the OS plays a sound and the listening stops. I would like to listen for this change and be able to automatically update the UI once listening has stopped. Currently I am using a timer and checking _speechToText.isListening every 50ms but I wasn't sure if there was an easier way to listen for this change.
I have a button in my app to start/stop the microphone speech to text process. On Android specifically, once the user stops speaking for a short period of time, the OS plays a sound and the listening stops. I would like to listen for this change and be able to automatically update the UI once listening has stopped. Currently I am using a timer and checking _speechToText.isListening every 50ms but I wasn't sure if there was an easier way to listen for this change.