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
Post a Comment