Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SpeechRecognizer: stopListening() vs. cancel()

From name alone, I can derive that stopListening() is the opposite of startListening().

I can also understand that destroy() is the opposite of createSpeechRecognizer().

But cancel()... is the opposite of what?

All I could find in the documentation about it is:

Cancels the speech recognition.

How is cancel() different from stopListening()?

like image 337
srf Avatar asked Apr 21 '11 13:04

srf


1 Answers

Well, you cancel the SpeechRecognition, i.e. I would assume there is no result handed back to you, whereas on stopListening() you just tell the recognizer that you are done with speaking and it should do the actual recognition now (and can close the microphone). Often, you don't need to call the stopListening() yourself as the end of speech is automatically determined (automatic endpointing).

like image 155
Stephan Avatar answered Oct 20 '22 07:10

Stephan