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

前端 未结 3 901
说谎
说谎 2021-02-14 01:01

For various reasons, I need to use the raw SpeechRecognizer API instead of the easier RecognizerIntent (RECOGNIZE_SPEECH) activity.

That means,

相关标签:
3条回答
  • 2021-02-14 01:04

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

    0 讨论(0)
  • 2021-02-14 01:15

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

    0 讨论(0)
  • 2021-02-14 01:22

    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.

    0 讨论(0)
提交回复
热议问题