An espeak TTS binding for Python3.

View project on GitHub

espeak TTS Bindings for Python3

Build status Build Status Coverage Code Climate Issue Count QuantifiedCode Issues Python Version espeak Version Linux Windows

Note: Even though the Linux build is failing on Travis CI, it actually works (experimentally verified). However, in some cases the binary needs to be recompiled.


First, we have to initialize a Speaker.

import espeak4py

mySpeaker = espeak4py.Speaker()

And then to speak:

mySpeaker.say('Hello, World!')

The above will stop interrupt the Speaker (mySpeaker in this case).

Note: A Speaker object can only interrupt itself.

Code to wait for any ongoing speech to complete:

mySpeaker.say('I am a demo of the say() function.', wait4prev=True)

Changing speech properties:


By default the pitch is set at 80.

Change it by:

mySpeaker.pitch = 120
Words per Minute (WPM):

By default WPM is set at 120.

Change it by:

mySpeaker.wpm = 140

By default the voice is set to ‘en’. Uses voice file of set name from espeak-data/voices.

Change it by:

mySpeaker.voice = 'es'