Orca

See https://help.ubuntu.com/community/Accessibility for a discussion of the screen reader Orca .

Ubuntu Text Reader

See http://www.dotdeb.com to download a .deb package of the Ubuntu Text Reader. This text reader uses festival as its engine and is capable of changing audio devices. It was programmed on Ubuntu for Ubuntu. It comes with 4 voices and the option to download several others. It has been tested on Ubuntu 8.04, 8.10, 9.04, 9.10, 10.04, 10.10.

Espeak

Espeak is the default text-to-speech / speech synthesizer software that comes pre-installed on Ubuntu 10.10 and 11.04 Natty.

There is a gui front-end for it in the Ubuntu Software Center: Gespeaker. And even you can find/install mbrola voices from there (show technical items)

Check out http://code.google.com/p/gespeaker/ too, for how to configure mbrola voices.

Reading text from clipboard

To read highlighted text with gespeaker (ver. 0.8.1) create a keyboard shortcut (ie. Super + R)

System Settings>Keyboard>Shortcuts>+

Command:

bash -c "gespeaker --play-text=\"$(xsel | sed -e :a -e '$!N;s/\n/ /;ta')\""

Installation

Note: xsel does not come preinstalled (sudo apt-get install gespeaker xsel)

Using a Terminal you can try this out:

Make some sound in english:

  • espeak -v en "Hello i am espeak"

Learn more about espeak in its man page:

  • man espeak

or at:

http://manpages.ubuntu.com/manpages/natty/en/man1/espeak.1.html

It works with existing sound server software. The home web page for this package can be found at http://espeak.sourceforge.net/.

A nice list of options for espeak available here:

http://www.thegeekstuff.com/2010/03/espeak-speech-synthesizer-for-ubuntu/

Festival

Another Text-To-Speech option for Ubuntu is a program called Festival.

[Info from forum user added see thread: http://ubuntuforums.org/showthread.php?t=2172905 And this link: http://www.solomonson.com/content/ubuntu-linux-text-speech ]

NOTE: Out of the box, Festival doesn't work with ESD (the default sound server up to Gutsy), PulseAudio (the default sound server since Hardy) or ALSA, so some changes are required to get it up and running.

This guide provides instructions on how to get Festival working on Ubuntu with ESD, PulseAudio and ALSA.

If you are using a version of Ubuntu prior to Hardy, and you don't want to use Festival with ESD, you will have to disable ESD in the Sounds preferences dialog. In that case, other multimedia applications won't be able to play audio at the same time.

Installation

Install Festival by typing the following command in a Terminal:

  • sudo apt-get install festival

Note: Additional voices are available in the Ubuntu repositories. Type "festvox" in Synaptic Package Manager for a list of language packages.

Configuration for ESD or PulseAudio

If you want festival to always use ESD or PulseAudio for output, you can configure this globally, for all users, or on a per-user basis. To configure globally use the configuration file /etc/festival.scm. To configure locally use the configuration file ~/.festivalrc.

  1. Open the configuration file by typing gksudo gedit /etc/festival.scm or gedit ~/.festivalrc in a terminal.

  2. Add the following lines at the end of the file:

    (Parameter.set 'Audio_Method 'esdaudio)

  3. Save the file.

This is the recommended method for playing audio in Ubuntu.

Configuration for ALSA

Note: It is hard to use ALSA and ESD on the same system, if it is possible at all. Here it is assumed that you are using ALSA instead of ESD.

Insert at the end of the file /etc/festival.scm or ~/.festivalrc the lines

(Parameter.set 'Audio_Command "aplay -D plug:dmix -q -c 1 -t raw -f s16 -r $SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Required_Format 'snd)

On some configurations it may be necessary to remove the "-D plug:dmix" part of the aplay command above.

Testing

Test your setup by typing in a Terminal

  • festival

You will be presented with a > prompt. Type

  • (SayText "Hello")

The computer should say "hello".

To listen to a text file named FILENAME, type

  • (tts "FILENAME" nil)

Note FILENAME must be in quote marks.


CategoryDocumentation

TextToSpeech (last edited 2013-09-07 06:18:33 by caf4926)