问题
I have successfully added Google Voice Search Activity using following code:
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US");
try {
startActivityForResult(intent, 1);
} catch (ActivityNotFoundException a) {
Toast t = Toast.makeText(context, "Oops! Your device doesn't support Speech to Text",Toast.LENGTH_SHORT);
t.show();
}
I searched in "en-US"
and its worked perfectly but sometimes it is searching like english of German or other countries and returning Pure ENGLISH WORDS. and not recognize my language.
Is there any SETTINGS that makes my search better.
Your help would be appreciated.
来源:https://stackoverflow.com/questions/21424377/android-google-voice-search-changed-language-automatically-sometimes