BUG: Hang / Crash when using Kokoro TTS
Whenever I enable TTS with Kokoro, after some time it will inevitably stop working (i.e. won't be any TTS generated), and cause A0 to hang. I'm not quite sure why. It does NOT happen if TTS is off.
Some ideas:
-
Improper sanitizing of strings There probably needs to be more careful preprocessing of messages sent to Kokoro for synthesis, some characters might be causing escaping issues, which then causes some error, crashing kokoro or causing some other unexpected behavior.
-
Kokoro consuming too many resources Not sure how the kokoro implementation works but if messages are too long, it might have a huge message queue and just pile on more and more messages as you continue to interact with the agent, potentially causing it to hang.
-
Memory leaks? Maybe because of either or both of the above, there can be memory leaks that are accumulating and eventually cause the system to hang.
i have tried changing from wav to mp3 and i think it helped but it could be my imagination.
it's definitely better since v094 (i think?) definitely better with v095
sigterm, hanging, service reatarts all made it impossible for kokoro on a hosted droplet when it first was included a few versions ago.
getting better thanks to some good community.
resource constraints.
glad to have it though. it's working much better v095
maybe someone can confirm if mp3 versus wav helped and also if a lower bitrate than 24000 is possible. ive tried the common ones and it bombs.