Open arkilis opened 1 year ago
I tried with slow speech ref clips but the results seems not good.
Yes, it is possible to add pauses or breaks in the speech output of a TTS (Text-to-Speech) program. This can be accomplished by adding appropriate markers or tags in the text input to indicate where the breaks should occur.
Here is an example of how you could add pauses in a TTS program using Python and the gTTS library:
python
from gtts import gTTS import os
text = "This is a sample text with pauses. Let's take a break after this sentence. And then we will continue."
sentences = text.split(". ")
for i, sentence in enumerate(sentences): tts = gTTS(text=sentence, lang='en') tts.save("sentence_{}.mp3".format(i))
# Play the speech output with a pause after each sentence
os.system("mpg321 sentence_{}.mp3".format(i))
os.system("sleep 3")
In this example, the text is split into sentences using the . character as a separator. The gTTS library is then used to generate speech output for each sentence, which is saved as an MP3 file. The os.system function is used to play the speech output and to add a pause of 3 seconds after each sentence.
You can adjust the duration of the pause by changing the sleep value in the code. Note that this code assumes that you have the mpg321 player installed on your system, but you can use any other player that is compatible with your system.
@coolst3r your solution looks like generated by ai, looks like not quite relevant to our question here.
i am human and not a ai sorry if that does not help you
@arkilis I've been messing around with interpunction and I have noticed a peculiar behaviour: adding a "-" at the end of a word tends to add a sort of pause. Though it tends to come out more like a studder.
Thank you for this great repo and data model. It is a GREAT work. Is that possible to manually add break. e.g. [break] in the speech output?
Thanks again!