Text-To-Speech Initialization Delay
<p>I am trying to add text-to-speech feature to my app, and it is working fine until I updated TTS from Google Play store.</p>

<p>There wasn't any delay to initialize the TTS in onCreate Method.
After the update, it would take 3-5 seconds for this TTS to finish initializing.
Basically, the text-to-speech is not ready until 3-5 seconds later.</p>

<p>Can someone please tell me what I've done wrong?</p>

<pre><code>private HashMap&lt;String, String&gt; TTS_ID = new HashMap&lt;String, String&gt;(); 

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    .....

    .....

    TextToSpeech_Initialize();
}

public void TextToSpeech_Initialize() {
    TTS_ID.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "UniqueID");     
    speech = new TextToSpeech(MainActivity.this, new TextToSpeech.OnInitListener() {
         @Override
         public void onInit(int status) {
            if(status == TextToSpeech.SUCCESS) {
               speech.setSpeechRate(SpeechRateValue);
               speech.speak(IntroSpeech, TextToSpeech.QUEUE_FLUSH, TTS_ID);
           }
         }
    });

}
</code></pre>

<p>Thank you very much</p>