private void onTtsReady(){
  Locale locale=Locale.getDefault();
  int languageAvailability=tts.isLanguageAvailable(locale);
  if (languageAvailability == TextToSpeech.LANG_MISSING_DATA || languageAvailability == TextToSpeech.LANG_NOT_SUPPORTED) {
    Log.w(TAG,"Default locale not available, use English.");
    locale=Locale.ENGLISH;
  }
  tts.setLanguage(locale);
  tts.setSpeechRate(TTS_SPEECH_RATE);
  tts.setOnUtteranceCompletedListener(utteranceListener);
}

private void onTtsReady ( ) { Locale locale = Locale . getDefault ( ) ; int languageAvailability = tts . isLanguageAvailable ( locale ) ; if ( languageAvailability == TextToSpeech . LANG_MISSING_DATA || languageAvailability == TextToSpeech . LANG_NOT_SUPPORTED ) { Log . w ( TAG , "Default locale not available, use English." ) ; locale = Locale . ENGLISH ; } tts . setLanguage ( locale ) ; tts . setSpeechRate ( TTS_SPEECH_RATE ) ; tts . setOnUtteranceCompletedListener ( utteranceListener ) ; }
called when tts is ready .
