Linux

Some Desktop platforms do not include speech synthesis in a default installation. The availability of various speech synthesis platforms varies by distribution, the version, and the setup options that you used when installing Linux.

Normally, you can select a speech synthesis tool, then install it following the instructions below. For English, French, Italian, German and Spanish, SVOX Pico is a good choice. For Catalan, Czech, Finnish, Hindi, Marathi, Russian and Telugu, festival is recommended. You can use espeak to read many other languages as well.

Get the extension at the Extensions web site. Open the extension with the LibreOffice or Apache OpenOffice program. Approve the extension. Restart the program.

Read Text Extension dialogue

Dialog box

Pico

PicoThe Pico speech synthesizer speaks clearly and is simple to use. The pico speech description files are in binary format only, so unlike espeak, you can't edit the speech rules for localized pronunciation of particular words or place names. The SVOX Pico speech synthesizer uses Hidden Markov Model (HMM) algorithms to produce clear speech output in the form of an audio file. It works with German, English, Spanish, French and Italian text. Read Text Extension now includes a python script to read the SVOX Pico audio file aloud using an audio or movie player.

    • The SVOX Pico speech synthesizer packages are available in Debian's non-free repository and in Ubuntu's multiverse repository. Use a package manager like Synaptic or apt-get to install the following packages:

        • libttspico0

        • libttspico-utils

        • libttspico-data

    • If you want to try it with Linux, and your distribution includes apt-get, use these commands to install it:

    • sudo apt-get install libttspico0 libttspico-utils libttspico-data

    • Other Linux distributions may make the SVOX Pico packages available with a different name. You need an up-to-date version of the Read Text Extension. Once you have installed the software, set up Read Text Extension's options with Tools - Add-ons - Read selection.... Use /usr/bin/python as the external program. Select a command line option that includes the token (PICO_READ_TEXT_PY).

Festival

Festival is an open source text to speech program. Language availability varies by platform, but Festival text to speech voices have been created for Catalan, Czech, English, Finnish, Hindi, Italian, Marathi, Spanish, Russian and Telugu. With Festival, custom voices will only work if they are installed. If you try to use a voice that is not installed, Festival will be silent. If you are using a Linux distribution that includes a package manager like Synaptic or apt-get, you can use it to install the necessary programs, lexicons and voices.

If your distribution uses the apt package management system, you can view a list your distribution’s festvox voices and languages using the command:

apt-cache search festvox | grep estival

If you want to hear English with Festival, and your distribution includes apt-get, use this command while connected to the Internet:

sudo apt-get install festival festvox-us-slt-hts

If you are using the dnf package manager and you want to try an English voice, just enter:

sudo dnf install festival

Your package manager might not be able to install all the voices listed in the Read Selection script dialog. Voices that include “mbrola” in the name may need to be installed manually if you want to use them. If you are using Festival, see the Festival web page or a forum for your platform for instructions how to install voices from the mbrola project.

Once you have installed the software, set up Read Text Extension's options with Tools - Add-ons - Read selection.... Use /usr/bin/python as the external program. Select a command line option that includes the token (FESTIVAL_READ_TEXT_PY).

If you want to experiment with different settings, the Festival package includes a tool for converting text to a wave sound file called text2wav. To use text2wav:

  • Select some text.

  • Show the Read Selection dialog with Tools → Add-Ons → Read Selection...

  • Select Read the Selection with another program - Browse to the path to text2wave

  • in Ubuntu Linux, the location is /usr/bin/text2wave

  • In the command box, enter "(TMP)" -o (HOME)ooo_festival_(NOW).wav

  • Click OK to create a wave file in your home document directory.

Flite

If you are only using English, then Flite is a simple, compact, low latency alternative to Festival.

sudo apt-get install flite

Select the command line option that includes the token (FESTIVAL_READ_TEXT_PY).

Espeak-ng

Espeak-ng (new generation) is a revision of espeak that some new distribution releases use. The Fedora Desktop includes it by default. Although espeak-ng can function as a stand-in replacement for Espeak, it uses updated code.

sudo apt-get install espeak-ng

Select a command line option that includes the token (ESPEAK_READ_TEXT_PY).

Espeak

Espeak is a open source speech system for Windows and Linux. The package includes a speech program that can run from a command line. It can be used with the Mbrola program to generate speech using higher quality Mbrola voices. If you want to try it with Linux, and your distribution includes apt-get, use this command to install it:

sudo apt-get install espeak

Select a command line option that includes the token (ESPEAK_READ_TEXT_PY).

Languages supported by espeak include Afrikaans, Albanian, Armenian, Cantonese, Catalan, Croatian, Czech, Danish, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Icelandic, Indonesian, Italian, Kurdish, Latvian, Lojban, Macedonian, Mandarin, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Spanish, Swahili, Swedish, Tamil, Turkish, Vietnamese, and Welsh. For best results with Cantonese, Mandarin and Russian, see the eSpeak data page. Versions of eSpeak for other operating platforms are available at http://espeak.sourceforge.net/.

Use standard quality voices with Linux

    • Install espeak.

    • Start your word processor.

    • Select some text.

    • Show the Read Selection dialog with Tools → Add-Ons → Read Selection...

    • Select Read the Selection with another program

    • Browse to the path to the espeak application - /usr/bin/espeak

    • In the command box, enter -v english -f "(TMP)"

    • Click OK

Use different languages and high quality voices

The newest version of espeak allows you to specify an mbrola voice directly in the command line. With the newest version, you don't need to create a script to use mbrola voices.

    • Open a terminal.

    • Make sure espeak 1.44 or newer is installed. To check the version: espeak --help | grep "text-to-speech"

    • Install mbrola voices. In Ubuntu or Debian Linux, you have several options. For example,

        • You can search for mbrola using the Synaptic package manager

        • Open a terminal and type sudo apt-get install mbrola mbrola-en1 mbrola-fr4 mbrola-us1

    • To use the new voices with the Read Text extension,

        • Select some text in your word processor.

        • Show the Read Selection dialog with Tools → Add-Ons → Read Selection...

        • Select Read the Selection with another program

        • Browse to the path to the Espeak application - /usr/bin/espeak

        • For UK English, in the command box, enter -v mb-en1 -f "(TMP)"

        • For US English, in the command box, enter -v mb-us1 -f "(TMP)"

        • For French, in the command box, enter -v mb-fr4 -f "(TMP)"

        • Right - Click OK to check the voice.

        • Click OK

Not all mbrola voices are supported yet in eSpeak. Check the eSpeak web site for more information.

Open Jtalk

The Open JTalk engine is a software speech synthesizer for Japanese.

Install `open_jtalk` using the following packages:

sudo apt-get install open-jtalk libhtsengine1 hts-voice-nitech-jp-atr503-m001 open-jtalk-mecab-naist-jdic

Select the command line option that includes the token (OPENJTALK_READ_TEXT_PY).

RhVoice

Your distribution might include the option to install the rhvoice speech platform and language packages. Some voices that use this speech platform use licenses like the Creative Commons Non-Commercial No Derivatives International 4.0 license. Read the documentation for more details.

If you are using the apt package management system, check that support for speech dispatcher is available using the apt-cache command:

apt-cache search speech-dispatcher-rhvoice

You can view a list of available language packages using the command:

apt-cache search rhvoice | grep ' voice'

To install English support, install the following packages:

sudo apt-get install libportaudio2 librhvoice-audio2 librhvoice-core4 librhvoice5 rhvoice-english speech-dispatcher-rhvoice rhvoice

Once the packages are installed, restart your computer, then use an option in the extension's main dialog command line option that includes the token (SPD_READ_TEXT_PY).

"(SPD_READ_TEXT_PY)" --language "en-GB" "(TMP)"

Use with Web Applications

Web applications let you do on-line translation, read multiple languages and try different voices.

    • Select some text.

    • Show the Read Selection dialog with Tools → Add-Ons → Read Selection...

    • Select Use a web application.

    • Choose or enter a web address with the appropriate parameters. -

    • https://translate.google.com/?&langpair=auto|(LANGUAGE_CODE)&tbb=1&ie=&hl=(LANGUAGE_CODE)&text=(OOO_WEBTEXT)

    • Click OK

For more information about web applications, read Use With Web Applications.

Other Options

Speech Dispatcher

Most desktop distributions include a package called speech-dispatcher. This is a tool that manages a speechd daemon - a system program that runs in the background. The speechd daemon restricts what a text to speech program can do. In principle, this makes using the system daemon inherently safer than using a speech synthesis program directly.

In the main menu of the Read Text Extension dialog,, you can choose settings in the main dialog that include the token (SPD_READ_TEXT_PY).

If you have installed high quality voices, you can enable them in speech-dispatcher by installing a speech-dispatcher settings module labelled with the name of the speech synthesis package. For example, the speech-dispatcher-festival module helps Speech dispatcher find Festival voices, and the speech-dispatcher-pico module helps it find Pico voices.

With distributions that use the apt package management system, you can view a list of available language modules using the command:

apt-cache search speech-dispatcher| grep module

To install support for a specific speech module, install the appropriate package using apt-get.

For example, if you wanted to install Pico speech synthesis support for speech-dispatcher, and your system has the necessary Pico packages, use:

sudo apt-get install speech-dispatcher-pico

System support

If you have difficulties reading the screen, consider a system-wide accessibility solution like Orca for the Gnome desktop or KTTS for the KDE desktop. If you have installed a system-wide accessibility solution, and it is activated, then you don't need this Add-On to read text aloud. However, you can use this extension with a script to save speech as an audio file.

Customize

If you want to view the dialog to change settings, use Tools - Add-Ons - Read Selection...