Install eSpeak on Ubuntu 18.04

Updated on April 12, 2019
Install eSpeak on Ubuntu 18.04 header image

ESpeak can generate text-to-speech (TTS) audio files. These can be useful for many reasons, such as creating your own Turing (Captcha) tests that are capable of speaking its challenge. This article will cover how to install eSpeak and create a simple TTS audio file in .wav format on Ubuntu 18.04.

Install eSpeak

Log in as the root user and update the system

# apt-get update && apt-get upgrade -y

Next, install eSpeak.

# apt-get install espeak

Generate your first TTS audio file

Test eSpeak by asking it to sound out the letters y j w c t j while writing the output as a .wav file named espeak-talk.wav in the /tmp/ directory. Next, we tell it we want a word gap of 60, the pause between words. We also tell it we want a pitch of 70 and a readout speed of 100.

# espeak "y j w c t j" -w /tmp/espeak-talk.wav -g 60  -p 70 -s 100 -v en-uk

You will now have a file named espeak-talk.wav located in /tmp/.