@CalledByNative private boolean speak(int utteranceId,String text,String lang,float rate,float pitch,float volume){
  if (!mInitialized) {
    mPendingUtterance=new PendingUtterance(this,utteranceId,text,lang,rate,pitch,volume);
    return true;
  }
  if (mPendingUtterance != null)   mPendingUtterance=null;
  if (!lang.equals(mCurrentLanguage)) {
    mTextToSpeech.setLanguage(new Locale(lang));
    mCurrentLanguage=lang;
  }
  mTextToSpeech.setSpeechRate(rate);
  mTextToSpeech.setPitch(pitch);
  int result=callSpeak(text,volume,utteranceId);
  return (result == TextToSpeech.SUCCESS);
}

@ CalledByNative private boolean speak ( int utteranceId , String text , String lang , float rate , float pitch , float volume ) { if ( ! mInitialized ) { mPendingUtterance = new PendingUtterance ( this , utteranceId , text , lang , rate , pitch , volume ) ; return true ; } if ( mPendingUtterance != null ) mPendingUtterance = null ; if ( ! lang . equals ( mCurrentLanguage ) ) { mTextToSpeech . setLanguage ( new Locale ( lang ) ) ; mCurrentLanguage = lang ; } mTextToSpeech . setSpeechRate ( rate ) ; mTextToSpeech . setPitch ( pitch ) ; int result = callSpeak ( text , volume , utteranceId ) ; return ( result == TextToSpeech . SUCCESS ) ; }
attempt to start speaking an utterance . if it returns true , will call back on start and end .
