I'm using SpeechRecognizer to convert speech to text. 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. I was wondering is there any method to change recognize engine programmatically? Thanks.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
Here is the implementation.
SpeechRecognizer.createSpeechRecognizer(mContext, ComponentName.unflattenFromString("com.google.android.googlequicksearchbox/com.google.android.voicesearch.serviceapi.GoogleRecognitionService"));
Thank you all.