title: Speech recognition intent starts before TTS ends speaking
body: <p>I've developed an Android App which give commands using tts (Text to Speech) and then listen to the vocal answer of the user using Speech Recognition Intent.</p>
  
  <p>Obviously, only when tts finishes to speak, then the intent of speech recognition is thrown.
  Sometimes, mostly when I swich from an activity to another, or when I activate this process through a button, THE SPEECH RECOGNIZER INTENT STARTS BEFORE TTS FINISHES TO TALK!
  The problem is that the same text of the command is then acquired and analyzed instead of the words of the user. The part of the code that tells speech recognizer to wait is this one:</p>
  
  <pre><code>while(tts.isSpeaking()){
      //DOING NOTHING
  }
  Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
  intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US");
  
  try {
        startActivityForResult(intent, RESULT_SPEECH);
  } catch (ActivityNotFoundException a) {
      Toast t = Toast.makeText(getApplicationContext(),"Opps! Your device doesn't support Speech to Text", Toast.LENGTH_SHORT);
      t.show();
  }    
  </code></pre>
  
  <p>Does anybody have a solution? It seems to be quite random. Sometimes it waits, sometimes not.
  Thanks everyone!!</p>