我使用 Android 的内置语音识别类编写了一个语音识别应用程序。当对使用 createSpeechRecognizer(context) 函数获得的语音识别器对象调用 startListening 函数时,我的开发人员控制台中出现以下异常。
安全异常:
java.lang.SecurityException: Not allowed to bind to service Intent
{ act=android.speech.RecognitionService
cmp=com.htc.android.voicedictation/.VoiceDictationService
}
知道为什么会发生这种情况以及如何解决这个问题吗?
在 Nexus 7 和 HTC ONE X 上测试工作。
在 HTC ONE M7 (4.2.2) 上失败
最佳答案
从此链接找到此问题的根本原因:https://groups.google.com/forum/#!topic/joaomgcd/qcSfL2-SIfk
解决方案:必须在设备上启用 Google 语音输入。
在 HTC One 设备上启用 Google 语音输入的步骤: http://eguides.sprint.com/support/eguides/htconem8/index.html#htc_one_m8_ug/keyboard_and_input_methods_google_voice_typing.html
关于java - HTC One M7 上的语音识别器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25250761/