Instead of blindly splitting the segments of a batch at every 200 characters which usually ended up splitting a word in half, segments are now, where possible, split at the closest word using Python's included text wrapping algorithm.
This results in better output for longer input strings as you don't get a word every 20 seconds of speech being pronounced in a b- r- oken way by the TTS engine.
Instead of blindly splitting the segments of a batch at every 200 characters which usually ended up splitting a word in half, segments are now, where possible, split at the closest word using Python's included text wrapping algorithm. This results in better output for longer input strings as you don't get a word every 20 seconds of speech being pronounced in a b- r- oken way by the TTS engine.