I read the official documentation and how did you report that it says that:
The maximum length of the text is 32,768 characters.
Perhaps they refer to the maximum length of an SSML file!
I used chrome api for a while and I can tell you that:
- Violation of statements occurs only when the voice is not native,
- Cutting usually occurs between 200-300 characters. When it breaks, you can freeze it by executing the function speechSynthesis.cancel ();
- The onend event sometimes decides not to fire. A bizarre workaround for this is to console.log () from the statement object before talking about it. I also found that wrapping the talk call in the setTimeout callback helps mitigate these issues.
I solved the problem of text splitting:
.