I use TextToSpeech to play some long texts, and I noticed that with Android 4.1.2 , if the text is longer than 4000 characters, it will not play.
I do not get any errors, but the text will not play. So far, I have been able to reproduce this only on Android 4.1.2 (Samsung Galaxy Nexus, Nexus7).
Is this a bug only in 4.1.2 or is it normal (although I have not found any documentation regarding this behavior)?
I also found a message: onUtteranceCompleted () is lost if the TTS is received too long , which indicates various problems with texts longer than 4000 characters.
EDIT: I tried to split my line in chunks of 4k length and send it to TTS using QUEUE_ADD , and I came across another error: QUEUE_ADD does not work, instead it deletes the existing queue and only the last fragment is played back.
EDIT2 : this is my TTS call
mTTS.speak(longText, TextToSpeech.QUEUE_FLUSH, null);
source share