in

Text-to-Speech Software for Linux

- - 9 comments
Text-to-Speech Software for Linux: If you've been using Mac OS X or Windows Vista before, you may be a bit disappointed to learn that there's no speech synthesizer or text-to-speech (TTS) application that is installed by default on your Linux distribution. For those of you who don't know what a speech synthesizer is, it's simply a computer program that converts normal language text into speech. Text-to-speech software can be of great help particularly for people who are visually impaired and those who are mute.

If you've been looking for a free speech synthesizer for Linux, the one that I can highly recommend is a program called Festival. As described from its project website: Festival offers a general framework for building speech synthesis systems as well as including examples of various modules. As a whole, it offers full text to speech through a number APIs: from shell level, though a Scheme command interpreter, as a C++ library, from Java, and an Emacs interface. Festival is multi-lingual (currently English (British and American), and Spanish) though English is the most advanced.

Festival is probably available in most distro repositories so just search for it and install it via the package manager. Once installed, you can immediately set it to work. Here are some basic uses of Festival:

It can read whatever you type on the command line. Open a terminal and start festival with this command:

$ festival

A prompt will appear. Make it speak by typing this from the command line:

(SayText "festival will read this line")

Festival can also be very useful if you want it to read a whole text file. From the terminal, simply navigate to where your text file is located, and use this command:

$ festival --tts your_text_file.txt

For more information and other options on using Festival, you can read the complete manual from HERE.

In KDE desktop, there's already a text-to-speech software installed by default called KTTS, but it is currently under development. Try to make it speak “Hello World” by typing these commands from the Linux terminal:

$ kttsd
$ dcop kttsd KSpeech setText "Hello World" "en"
$ dcop kttsd KSpeech startText 0

KTTS has a GUI front-end called KMouth.


A user can type a word, phrase, or sentences that he/she wants to hear through its input field. KMouth also contains a history of spoken phrases so the users can easily select phrases from the history which he/she wants to be re-spoken using a few mouse clicks. It also has a phrase book and word completion options.

For GNOME users, you can use Orca’s speech synthesizer. I haven't tried it yet so for those of you who have, please share with us your experiences of using Orca.

I’ve used the text-to-speech software of Mac OS X before and I must say that it’s more functional than those we currently have for Linux. But, that’s just my opinion.

How about you? How do you compare Linux speech synthesizers to those available for Windows or Mac?

9 comments

  1. espeak is available to ubuntu users from repository:
    sudo apt-get install espeak

    It can then be used from commandline:
    espeak "Good morning, Dave"

    ReplyDelete
  2. "espeak is available to ubuntu users"
    True and it's a good application, you can try it online here:http://apps.adnanalliance.org/speech/

    "For GNOME users, you can"
    True, but then the user will have to download KDE libraries which is a pain to me!

    ReplyDelete
  3. "True, but then the user will have to download KDE libraries which is a pain to me!"

    Your package manager should handle that for you, so you just have to install Kmouth, and it shold take care of the rest.

    ReplyDelete
  4. There are a lot of KDE libraries. I think Amarok requires like 400MB of stuff downloaded if you don't have KDE.

    ReplyDelete
  5. It seems a couple of others have already stated it, but here it is again, Ubuntu comes with espeak already installed. I checked my Synaptic Package Manager and espeak boxes were green indicating it was already installed. I didn't have to do anything.

    ReplyDelete
  6. Also possibly worth considering is MBROLA:

    http://tcts.fpms.ac.be/synthesis/mbrola.html

    Pros: Voice databases for a wide variety of languages. Comes compiled for Linux or BSD or any of many other platforms. No cost. Perl GPL application available for use in conjunction.

    Cons: Not Open Source. Distributed only as binary. Rather restrictive license: Binary executable and voice database must be used together; non-commercial and non-military uses only.

    ReplyDelete
  7. Hello

    Thanks for an interesting topic, let it not now trace out in a KDE better than GNOME diskution.

    I have reviewed the festival and kmoth and they work pretty well, would want to change the reading speed. But sometimes it is too large texts seem to program failure and sometimes hang :-(

    I'm dyslexic and Swedish. This allows read and write in Swedish is rather slow, but in English it is almost impossible. Thanks to Google Translate (which I use now), I can solve the writing. And the reading I use a text to speech program because I understand English well. There are a few to Win, which is decent, but Apple is the best. But it is interesting that missed here is that wine is not so much the better, but voting for easier handling, you can just select a text and then have a combination of keys and the text is read out, no cutting paste needs. It facilitates really much!

    Can this be resolved in X / KDE / GNOME in any way?

    Regards Rickard

    ReplyDelete
  8. AnonymousJune 27, 2010

    A frontend called Gespeaker (currently 0.8.1) is now available for gnome users. It uses the espeak engine or mbrola if installed. For natural voices you can purchase Cepstral voices for linux. This uses the Swift engine and is on par with Windows based text to speech engines

    ReplyDelete
  9. Here is a Perl script which uses Google TTS. It takes a text file and generates mp3 output:

    http://michalfapso.blogspot.com/2012/01/using-google-text-to-speech.html

    ReplyDelete