[英]Android SpeechRecognizer set recognize engine?
I'm using SpeechRecognizer to convert speech to text. 我正在使用SpeechRecognizer将语音转换为文本。 I'm using Samsung and I encounterd error while I set Voice recognizer to 'Samsung powered by Vlingo', after I changed to 'Google' and the error disappear.
我正在使用三星,当我将语音识别器设置为“由Vlingo驱动的三星”时,我遇到了错误,当我更改为“谷歌”后,错误消失了。 I was wondering is there any method to change recognize engine programmatically?
我想知道是否有任何方法可以以编程方式更改对引擎的识别? Thanks.
谢谢。
I've found the answer of my question. 我找到了问题的答案。 I can use 'public static SpeechRecognizer createSpeechRecognizer (Context context, ComponentName serviceComponent)' the method to choose which recognition service to bind.
我可以使用“公共静态SpeechRecognizer createSpeechRecognizer(上下文上下文,ComponentName serviceComponent)”方法来选择要绑定的识别服务。
Here is the implementation. 这是实现。
SpeechRecognizer.createSpeechRecognizer(mContext, ComponentName.unflattenFromString("com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService"));
Thank you all. 谢谢你们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.