RecognizerIntent change default language

android-4.2-jelly-bean, java, speech-recognition

Solution

I solved the problem:

String language =  "us-US";
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,language);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, language); 
intent.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, language);
startActivityForResult(intent, RESULT_SPEECH_GUEST);

Problem

i start the RecognizerIntent with this code: ``` Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,"us-US"); startActivityForResult(intent, RESULT_SPEECH_GUEST); ``` but my phone is configurated in italian and when i speech for example "Wait a minute" it return me "uait a minut"(the italian pronunciation). Why? Best Regards

Original source