KoljaB/RealtimeTTS

Is there any way to change the speech speed?

Opened this issue · 1 comments

Previously I used gtts in my project and in order to speed up the sound I wrote this code:

from gtts import gTTS
from pydub import AudioSegment
from pydub.playback import play

def speak(my_text):
     with io.BytesIO() as f:
         gTTS(text=my_text, lang=LANGUAGE).write_to_fp(f)
         f.seek(0)
 
         sound = AudioSegment.from_file(io.BytesIO(f.read()))
         sound = sound.speedup(1.0+(SPEED_UP/100), 150, 25)
         play(sound)

But my code didn't provide real-time voice generation. Then I saw this repository, and now I'm wondering if it's possible to do something similar with GTTSEngine()

Not yet. I can add that in the next version.