Closed martinmildner closed 7 months ago
Does the double-space have any impact on the speech synthesis? I appreciate the PR, but I'm wondering if this has any impact.
Hmm, I tested it with a few voices. Some had a longer pause, others did not. For example, 307 doesn't care...
Interesting! My belief had been that whitespace was generally ignored, but I have not spent any time validating that. I'll try to do some tests of my own later this week and will note what I find here.
I had a chance to do some tests with and without whitespace, using the following:
a lot of unnecessary white space.```
and
```This is an example of text with no unnecessary white space.
I wonder if it will sound any different.```
I ran them each with no options (so using default VITS p335 speaker), and with XTTS using a fine-tuned voice I have used for several books. I could not detect any difference between the samples, so I don't think this is necessary.
I do want to say though I really appreciate you submitting the PR and making an effort to improve things! Also if you have an example you can share that reliably produces longer pauses or any other unusual behavior please share and I'll do my best to replicate your findings.
The use of the sample.txt text reveals that double spaces sometimes occur when combining sentences. To prevent this, we should remove them.
Before: ['This script takes an epub (or text file) and reads it to an m4b audiobook file,DoubleSpaceusing TTS by Coqui or OpenAI.',
After: ['This script takes an epub (or text file) and reads it to an m4b audiobook file, using TTS by Coqui or OpenAI.',