onutterancecompleted

onUtteranceCompleted() lost if TTS received is too long

Deadly 提交于 2019-12-08 19:16:28
问题 I just observed an "undocumented anomaly" in Android's TTS engine: If the text to be spoken is too long (greater than 4K characters), then onUtteranceCompleted() for that particular utterance will never arrive... Has anyone else come across this? Is this a known bug or limitation? What could be done to work around this? 回答1: I wasn't aware of the limit, as I prefer smaller chunks of speech (useful if pausing or if activity is paused). When you call speak, you can add the new utterance to the

onUtteranceCompleted does not get called?

99封情书 提交于 2019-11-29 09:48:56
Even though I am setting it correctly: HashMap<String, String> myHashRender = new HashMap<String, String>(); myHashRender.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "utid"); mTts.speak("Speak something", TextToSpeech.QUEUE_ADD, myHashRender); also mTts.setOnUtteranceCompletedListener(this); in the onInit function return success. Still the onUtteranceCompleted does not get called. Though there are duplicate questions, but no where I could find the answer. My Activity also implements OnUtteranceCompletedListener. Please help. Call the setOnUtteranceCompletedListener inside the onInit

onUtteranceCompleted does not get called?

跟風遠走 提交于 2019-11-28 03:20:51
问题 Even though I am setting it correctly: HashMap<String, String> myHashRender = new HashMap<String, String>(); myHashRender.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "utid"); mTts.speak("Speak something", TextToSpeech.QUEUE_ADD, myHashRender); also mTts.setOnUtteranceCompletedListener(this); in the onInit function return success. Still the onUtteranceCompleted does not get called. Though there are duplicate questions, but no where I could find the answer. My Activity also implements