Forcing a particular language for RecognizerIntent is straightforward as described in this answer.
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, "en-US");
But that only works if the intent
instantiated is of type RecognizerIntent.
In my application I use the lower-level SpeechRecognizer
, i.e.:
Intent intent = new Intent(SpeechRecognizer.RESULTS_RECOGNITION);
And trying to force the language as decribed above simply doesn't work.
What is the proper way of programmatically setting the language preference for SpeechRecognizer?
Is this possible at all?