Does RecognitionListener.onError() automatically SpeechRecognizer.cancel()? Does RecognitionListener.onError() automatically SpeechRecognizer.cancel()? android android

Does RecognitionListener.onError() automatically SpeechRecognizer.cancel()?


No, cancel is not called when onError is invoked. You can look at the source here.


you can destroy current session by destroy(). And you can restart it again


Actually Femi, some of the error conditions DO stop the transcription service from listening (SpeechRecognizer.ERROR_SPEECH_TIMEOUT for example). It is not necessary to call destroy, just startlistening again.