HTC One M7上的语音识别器

时间:2014-08-11 19:20:05

标签: java android speech-recognition htc-android

我使用android的内置语音识别类编写了一个语音识别应用程序。在使用createSpeechRecognizer(context)函数获取的语音识别器对象上调用startListening函数时,我的开发人员控制台中会出现以下异常。

抛出:SecurityException:

java.lang.SecurityException: Not allowed to bind to service Intent
{   act=android.speech.RecognitionService        
    cmp=com.htc.android.voicedictation/.VoiceDictationService 
}

为什么会发生这种情况以及如何解决这个问题?

在Nexus 7& S测试工作HTC ONE X。

HTC ONE M7(4.2.2)

失败

2 个答案:

答案 0 :(得分:1)

通过以下链接找到此问题的根本原因: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

答案 1 :(得分:0)

我遇到了同样的问题。我通过Going to Settings->解决了这个问题。语言与键盘 - >语音输入 - >然后启用“基本Google识别”,因为此单选按钮在我的同一HTC手机中被禁用。