小编Ale*_*x B的帖子

Android Speechrecognizer stopListening()无效?

在调用startListening()之后,在Android上使用SpeechRecognizer.stopListening()时遇到问题.它似乎没有任何效果.继续处理音频,并返回识别结果,就像没有调用stopListening()一样.

还有其他人有类似的问题吗?我可能做错了吗?

一个可能的线索:在调用stopListening()之后,立即使用SpeechRecognizer.ERROR_CLIENT调用onError().也许这意味着停止调用失败了?

在检测到语音开始之前或正在处理语音时调用stopListening()时,都会出现此问题.

startListening()和stopListening()都是从主线程调用的.

至少在两个不同的设备上测试了Android 5和6.

android speech-recognition

5
推荐指数
1
解决办法
1892
查看次数

标签 统计

android ×1

speech-recognition ×1