Speech recognition offline mode does not work in my app but works in other apps

470 views Asked by At

I'm developing an application that use Google speech recognition , i'm installing English packages for US and UK , but when i run my app i can't use the offline feature , but in Other apps like Google Chrome it's works like a charm for offline mode , i don't know what i missed , is it the configuration or something in my code .

THis is my code :

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);

    intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
            RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);

    intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en_UK");
    intent.putExtra(RecognizerIntent.EXTRA_PROMPT,
            getString(R.string.speech_prompt));
    try {
        startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);
    } catch (ActivityNotFoundException a) {
        Toast.makeText(getApplicationContext(), "speach not supported",
                Toast.LENGTH_SHORT).show();
    }

and this is a capture from my app it always says Touch the mic Try speaking again

enter image description here

1

There are 1 answers

0
Luis V On

I've been having exactly the same issue and i just found that is some bug with an Google App update's, so you have to go to settings > apps > Google > remove updates and then download your language packages again and that's all

I found this here