eSpeak, convert text to speech from Ubuntu terminal

about eSpeak

In the next article we are going to take a look at eSpeak. It's about a speech synthesizer for English and other languages that we can use in Ubuntu. In the following lines we are going to see how we can install it in Ubuntu 18.04.

This tool for the command line takes the input in the form of a text string, an input file, and a stdin to play it in a computer generated voice.

ESpeak installation on Ubuntu

We will find this tool available in the official Ubuntu repositories. For this reason, its installation is simple from the terminal (Ctrl + Alt + T). In it we will only have to start by updating the index of available packages by typing:

sudo apt update

After the update, we are ready to install eSpeak. To do it we will only have to write in the same terminal:

install espeak

sudo apt install espeak

After the installation we will be able to check the version number of the app, at the same time that we will also check that it was installed correctly in the system. We will do this by writing the command:

espeak version

espeak --version

Use eSpeak to convert text to audio

Through the eSpeak utility, we will be able to easily listen to a specific text. We can do this in three simple ways. The first will be using the following command to listen to a text specified in quotes:

test line espeak

espeak "Testing espeak from the Ubuntu 18.04 terminal"

We will also be able to type the following command and then press Intro:

espeak

Now we just have to write the text we want eSpeak to read aloud. After writing it, we only have to press Intro.

read speak text line by line

In this case, we can add as many lines of text as we want. To exit the utility, press the key combination Ctrl + C.

One of the most useful ways to use this application is the possibility of listen to the content of a text file. You just have to use the following syntax to specify the text file that you want to hear aloud:

espeak -f archivo-de-texto.txt

In addition to those indicated, we can find other ways in which we can use this application. We can use the following command to view tool help and inform us:

speak help

espeak --help

Or we can also use the documentation that we will find available on the project website.

aboutHyper
Related article:
Hyper, a terminal emulator built with web technologies

A graphical interface called Gespeaker

about gespeaker

Gespeaker is a free GTK + interface for espeak, even if we choose to install this interface we will not need to install espeak. Will allow us reproduce a text in many languages with voice, pitch, volume and speed settings. The read text can also be recorded to a WAV file for future listening. This tool is indicated for users who do not want to use the command line.

We will have the possibility to install this software through the Ubuntu user interface in a simple way. To begin with we will not have more than open Ubuntu software option. We will click the magnifying glass icon and we will to write 'gespeaker'in the search bar. The results will show us something like the following:

search for gespeaker from Ubuntu software option

From here we will be able install this tool. In case you want to use the command line to install the same application, you just have to use the following command in the terminal (Ctrl + Alt + T):

sudo apt install gespeaker

After installation, we can search for the launcher on our computer:

gespeaker launcher

The Gespeaker user interface is pretty straightforward. There should be no problem figuring out how convert our text and text files to audio. To obtain the desired result, in addition to the controls that we will find in the program's interface, we can also configure their properties.

gespeaker properties

More information about this project can be obtained at their website.

Remove eSpeak

If you want to remove eSpeak we can do it using the following command in the terminal (Ctrl + Alt + T):

sudo apt remove espeak; sudo apt-get autoremove

Whether you are a terminal user or prefer the user interface, there should be no problems when it comes to transform text into audio output thanks to eSpeak or Gespeaker.


2 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Raul said

    this program would be very good if the linux voices weren't so robotic

  2.   Baphomet said

    I did not remember this tool, thank you.