title: Android studio Speech to text offline mode not working
body: <p>I am trying to get speech to text working offline on an Android app I am developing in Android Studio. Here is the code I use to set up the speech recognizer. </p>
  
  <pre><code>    public void openSpeechMode(View view) {
  
          Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
          intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
          intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());
  
          if(intent.resolveActivity(getPackageManager()) != null) {
              startActivityForResult(intent, 10);
          } else {
              Toast.makeText(context, "Your device does not support Speech Input.", Toast.LENGTH_LONG).show();
          }
  
      }
  </code></pre>
  
  <p>This works fine when I am online, but when I am offline it does not work. I read that I need to ensure that I follow these steps below on my Android device... to ensure my device has the library necessary to work in offline mode.</p>
  
  <pre><code>1)Go to Settings
  2)Click on “Language and input”
  3)Select Google voice typing
  4)Select Offline speech recognition
  5)Install desired language
  6)Once the download was done, turn off the internet and test it !!
  </code></pre>
  
  <p>I followed those steps and I do have English (UK) and English (US) installed on my android device. BUT the speech to text app still does not work when I am offline. When I click the microphone, I get the message saying "Network not connected" "try again". </p>
  
  <p>Am I doing something wrong? Can anyone assist?
  Thanks</p>