javaandroidandroid-studiogoogle-apispeech-recognition

RecognizerIntent.EXTRA_LANGUAGE recently doesn't change Recongnizer language


I have a code in my application which recognize "Persian" language and make a Speech-to-text function:

  Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
        intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "fa");
        intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak...");

but now it's suddenly stopped working and just recognize my STT as English! I didn't change anything. When I'm changing RecognizerIntent.EXTRA_LANGUAGE to any other language like Italian intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "it"); it doesn't recognize this language either!

What's wrong?

(edit reason: spelling mistake)


Solution

  • ok seems it's a bug that's reported already and google developers are working on it:

    https://issuetracker.google.com/issues/378566922