Android Google Voice Search changed language automatically sometimes

耗尽温柔 提交于 2019-12-11 05:37:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!