To translate speech in the text is used Google Speech. Android on my phone is in English, so GS only recognizes English. How to make the user set the language himself?

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, stt_code); try { startActivityForResult(intent, RESULT_SPEECH); } catch (ActivityNotFoundException a) { Toast.makeText(getApplicationContext(), "Ops! Your device doesn't support Speech to Text", Toast.LENGTH_SHORT).show(); } 

    1 answer 1

     intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en-US");