Tony Lin
Tony Lin

Reputation: 805

Android SpeechRecognizer set recognize engine?

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.

Upvotes: 2

Views: 1785

Answers (1)

Tony Lin
Tony Lin

Reputation: 805

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.

Upvotes: 5

Related Questions