TextToSpeech tts = new TextToSpeech(context, this);
tts.speak(text, TextToSpeech.QUEUE_ADD, null);
how can i know when speech is finished with speaking, becouse when stop talking i need to execute some extra code. But i have problem becouse i don’t knowh how to check if speech is finished with talking.
Is there any option to check this?
Yes, there are two listeners:
I haven’t used the UtteranceProgressListener, but the OnUtteranceCompletedListener is very particular. Here are two tips:
onInit()callback, never before.paramstospeak()with a validKEY_PARAM_UTTERANCE_ID, otherwise this listener is never called.