草庐IT

stopListening

全部标签

Android SpeechRecognizer : stopListening() vs. 取消()

仅从名称,我就可以得出stopListening()与startListening()相反.我也能理解destroy()与createSpeechRecognizer()相反.但是cancel()...与什么相反?我能在文档中找到的所有内容是:Cancelsthespeechrecognition.cancel()与stopListening()有何不同? 最佳答案 好吧,你取消了SpeechRecognition,即我假设没有结果返回给你,而在stopListening()上你只是告诉识别器你已经完成了说话并且它现在应该进行实际识

Android Speechrecognizer stopListening() 没有效果?

我在调用startListening()后在Android上使用SpeechRecognizer.stopListening()时遇到问题。它似乎没有任何效果。继续处理音频,并返回识别结果,就像没有调用stopListening()一样。有没有人遇到过类似的问题?我可能做错了什么吗?一个可能的线索:在调用stopListening()之后,立即使用SpeechRecognizer.ERROR_CLIENT调用onError()。也许这意味着停止调用失败?在检测到语音开始之前或在处理语音时调用stopListening()时会出现此问题。startListening()和stopList