Closed jitspoe closed 1 year ago
It's an issue with the base implementation of SAM that this plugin uses. It does have issues parsing long consecutive text which is why I made some effort to split sentences up into phrases and parse them in smaller chunks.
I can look over the original source and see if there's anything I can do for this specific case, but it's a rough bit of C code to follow.
Are you just wanting to make yelling/screaming sounds using the voice, or just limit testing it?
Good news, that was easier to fix than I thought!
Updates coming soon.
Nice! I was just using it for a twitch chat bot tts redeem, and within the first few minutes somebody froze my bot with that string 😆
I ended up just truncating words to 29 characters and that seemed to fix it.
@jitspoe Alright you should be good to go here. I'll submit these fixes to the Asset Library or you can just grab the updates from here. There's still a buffer cap so you can't spam a single long string of vowels and get infinite audio out of it, but it will no longer freeze when attempting to do so.
You can however space your infinite strings of vowels into separate words, just don't tell your chat that.
Also, another change comes along with this, realizing I had my phonetic usage switched. You'll want to use phonetic as false now for default text to speech.
Thanks for the quick fix! Also noticed it would break on even short "uuuuuuu" sequences, but it looks like your patch fixed that as well.
Actually, it might just be the number of consecutive characters, as "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" also seems to break it. Completely freezes up on the call to
var buffer = _synth.speak(phrase) as PackedByteArray
Looks like 29 characters is the maximum before it freezes.