I have a problem when using SpeechRecognizer.stopListening() on Android, after having invoked startListening(). It simply seems to have no effect. The audio continues to be processed, and the recognition results are returned, just as if stopListening() had not been invoked.
Has anyone else had similar problems? May I be doing something wrong?
A possible clue: Immediately after invoking stopListening(), onError() is called with SpeechRecognizer.ERROR_CLIENT. Perhaps this means that the stop invocation failed?
The problem appears both when stopListening() is invoked before the start of speech is detected, or while speech is being processed.
startListening() and stopListening() are both invoked from the main thread.
Tested with both Android 5 and six on at least two different devices.