Speech Recognizer on HTC One M7

旧时模样 提交于 2019-12-07 15:02:16

问题


I wrote a speech recognition app using android's built-in speech recognition classes. The following exception shows up in my developer console when the startListening function is called on the speech recognizer object obtained using createSpeechRecognizer(context) function.

SecurityException:

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

Any ideas why this is happening and how to fix this?

Tested working on Nexus 7 & HTC ONE X.

Failed on HTC ONE M7 (4.2.2)


回答1:


Found the root cause of this issue from this link: https://groups.google.com/forum/#!topic/joaomgcd/qcSfL2-SIfk

Solution: Google voice typing must be enabled on a device.

Steps to enable Google voice typing on HTC One device: http://eguides.sprint.com/support/eguides/htconem8/index.html#htc_one_m8_ug/keyboard_and_input_methods_google_voice_typing.html




回答2:


I have faced the same issue. I solved it by Going to Settings-> Language & keyboard -> Voice Input-> Then enable the 'Basic Google recognition', as this radio button was disabled in my same HTC phone.



来源:https://stackoverflow.com/questions/25250761/speech-recognizer-on-htc-one-m7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!