I’ve been working on speech Recognition API in android and found out that the speech results vary allot when the language settings are changed , is there a way to set it programmatically ? or is there an intent to lunch the speech language settings screen ? or what else ?
note:
I tried to use this intent extra:
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, "en-US");
but it was ineffective
As pargat says, this will do it:
Also, your app can query for the list of supported languages by sending a
RecognizerIntent.ACTION_GET_LANGUAGE_DETAILSordered broadcast like so:where LanguageDetailsChecker is something like this:
For the complete code check out this github project:
https://github.com/gast-lib