Skip to content Skip to sidebar Skip to footer

Does Recognitionlistener.onerror() Automatically Speechrecognizer.cancel()?

For various reasons, I need to use the raw SpeechRecognizer API instead of the easier RecognizerIntent (RECOGNIZE_SPEECH) activity. That means, among other things, that I need to h

Solution 1:

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

Solution 2:

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

Solution 3:

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.

Post a Comment for "Does Recognitionlistener.onerror() Automatically Speechrecognizer.cancel()?"