Android : How to implement multilingual voice recognition ok-google style

on Friday, April 3, 2015


Generally we can recognize speech by this intent:



Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, locale.toString());
try {
startActivityForResult(intent, RESULT_SPEECH);
} catch (ActivityNotFoundException a) {}


But I'd like to implement call with ok-google style, when you don't need to define language to recognize.


0 comments:

Post a Comment