how to lengthen the pause between the words with text-to-speech (pyTTS or SAPI5)

Posted by Berry Tsakala on Stack Overflow See other posts from Stack Overflow or by Berry Tsakala
Published on 2010-11-13T12:43:28Z Indexed on 2011/02/08 7:25 UTC
Read the original article Hit count: 349

Is it possible to extend the gap between spoken words when using text to speech with SAPI5 ?

The problem is that esp. with some voices, the words are almost connected to each other, which makes the speech more difficult to understand.

I'm using python and pyTTS module (on windows, since it's using SAPI)

I tried to hook to the OnWord event and add a time.sleep() or tts.Pause(), but apparently even though all the events are caught, they are being processed only at the end of the spoken text, whether i'm using the sync or async flag.

In this NON WORKING example, the sleep() method is executed only after the sentence is spoken:

tts = pyTTS.Create()
def f(x):
    tts.Pause()
    sleep(0.5)
    tts.Resume()

tts.OnWord = f
tts.Speak(text)

© Stack Overflow or respective owner

Related posts about python

Related posts about accessibility