title: Android SpeechRecognizer not getting started again
body: <p>I know how the SpeechRecognizer works in the android. I have a requirement that i need to call <strong>SpeechRecognizer.stopListening()</strong> method after some time. But after that when i start listener again it would not work.</p>
  
  <p>Code to start SpeechRecognizer</p>
  
  <pre><code>private void promptSpeechInput() {
      /*
      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());
      intent.putExtra(RecognizerIntent.EXTRA_PROMPT,
              getString(R.string.speech_prompt));
      try {
          startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);
      } catch (ActivityNotFoundException a) {
          Toast.makeText(getApplicationContext(),
                  getString(R.string.speech_not_supported),
                  Toast.LENGTH_SHORT).show();
      }
      */
  
      speechIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
      speechIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
      speechIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, context.getPackageName());
      // for more: https://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android
      /*intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en_IN"); */
      speechIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());
      speechIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 1);
      speechIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS, 200);
      speechIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, new Long(5000));
      speechIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS, new Long(5000));
      speechIntent.putExtra("android.speech.extra.DICTATION_MODE", false);
      speechIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, false);
      /*
      intent.putExtra("android.speech.extra.GET_AUDIO_FORMAT", "audio/AMR");
      intent.putExtra("android.speech.extra.GET_AUDIO", true);
      */
  
      sr.startListening(speechIntent);
  }
  </code></pre>
  
  <p>After few seconds of speaking i do use</p>
  
  <pre><code>sr.stopListening();
  </code></pre>
  
  <p>And after receiving the results in <strong>onResults</strong> i am trying to start it again using </p>
  
  <pre><code>sr.startListening(speechIntent);
  </code></pre>
  
  <p>but its not working. What should i do to make it work ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>if I call <strong>promptSpeechInput();</strong> method again instead of <strong>sr.startListening(speechIntent);</strong> it starts giving me <code>SpeechRecognizer.ERROR_RECOGNIZER_BUSY</code> error repeatedly.</p>