Reputation: 1
onUtteranceCompleted does not fires after speak() completed.
This is the code
HashMap dummyTTSParams = new HashMap(); dummyTTSParams.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "theUtId"); mTts.speak("Hello how are you",TextToSpeech.QUEUE_FLUSH, dummyTTSParams);
what is the reason for not calling onUtteranceCompleted(), I mentioned the utterance id "theUtId".
Replay me
Upvotes: 0
Views: 508
Reputation: 11
And it's very important to call the setOnUtteranceCompletedListener AFTER the TTS initialization. A good place is the onInit method (the Activity has to implement an OnInitListener interface) when the following condition has been satisfied:
status == TextToSpeech.SUCCESS
Upvotes: 1
Reputation: 53657
check whether you have added the setOnUtteranceCompletedListener
listener.
Please have a look here
Thanks Deepak
Upvotes: 0