android - How to use TextToSpeech: stopping and playing again? -


i have problem tts. i'm using code below, when tts "is speaking", calling tts.speak() after tts.stop() doesn't work (no voice). both return 0 (success). can wrong ? better approach ?

 if(tts.isspeaking()) {      tts.stop(); // return success  }  tts.speak(longtext, texttospeech.queue_flush, null); // return success 

i not quite sure you're trying accomplish if want ignore speaking, can use queue_flush without stop().

//if(tts.isspeaking()) { //   tts.stop(); //} tts.speak(longtext, texttospeech.queue_flush, null);  

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -