Jun
18
Making Your Ubuntu System Read Out Loud
June 18, 2009 | By: UbuntuLinuxHelp | 3 Comments
Posted in Experiences
I had an interesting morning playing with my Ubuntu (Hardy - 8.04) system. I just created a nice new desktop, with super effects and graphics and wondered if there's not a way to create a more customized "ear candy" environment (since I've already covered the eye candy aspect). I discovered that Ubuntu (and most likely other Linux distributions) has a speech synthesis package included, it's called espeak.
In my system, it was installed by default. If you don't have it available, the command to install is:
sudo aptitude install espeak or simply click: apt:espeak
To realize what I'm talking about, run this command in terminal:
espeak "eSpeak is a compact open source software speech synthesizer for English and other languages, for Linux and Windows. eSpeak produces good quality English speech. It uses a different synthesis method from other open source TTS engines, and sounds quite different. It's perhaps not as natural or "smooth", but I find the articulation clearer and easier to listen to for long periods. It can run as a command line program to speak text from a file or from stdin. A shared library version is also available. It works well as a Talker with the KDE text to speech system (KTTS), as an alternative to Festival for example. As such, it can speak text which has been selected into the clipboard, or directly from the Konqueror browser or the Kate editor. A Gnome Speech driver is now available."
or another language:
espeak -vfr "eSpeak compact est un logiciel open source synthèse vocale pour l'anglais et autres langues, pour Linux et Windows. eSpeak produit de bonne qualité discours anglais. Il utilise une autre méthode de synthèse à partir d'autres moteurs de TTS open source, et des sons très différents. C'est peut-être pas aussi naturelle ou "smooth", mais je trouve l'articulation claire et plus facile à écouter pendant de longues périodes. Il peut fonctionner comme un programme en ligne de commande pour parler du texte d'un fichier ou à partir de stdin. Une version de la bibliothèque est également disponible. Cela fonctionne bien comme un Talker KDE avec le système de synthèse vocale (KTTS), comme une alternative au Festival, par exemple. À ce titre, il peut parler du texte qui a été sélectionné dans le presse-papier, ou directement à partir de Konqueror, le navigateur ou l'éditeur Kate. A Gnome Discours driver est désormais disponible"
While I find the voice is not as natural, I do find it easier to understand than some others. I wondered is there could be some changes to the voice however, so I took a look at the espeak documentation, and there are some switches we can use to tweak.
To get a listing of the available voices, the command is:
espeak --voices
To enable the Germanvoice, the switch would be -vde, for French, -vfr and so on. Kind of interesting isn't it? But so far it's not really anything I can use! I want it to be able to read documents or web pages out loud while I'm doing something else. Well... I found out it can do that!
If I combine the wget command with espeak, it will get the appropriate web page and then read it. Here's an example:
wget -qO - http://espeak.sourceforge.net/add_language.html | espeak -m -ven
The above command optains the web page and then the -m -ven switches ensure the page is read out (and that it's not simply repeating the code). I found the speech a little fast, but you can slow it down sith the "s" switch like this:
wget -qO - http://espeak.sourceforge.net/add_language.html | espeak -m -s 140 -ven
More switches as Command Line Options can be found on the site. Either way, I found it interesting enough to jot this post off to all of you. I could go on and on, but thing it's better for those interested to play with it and see what works for them (instead of just reading about it). If anything, I did have a bit of fun with this!
I'd be very interseted (I guess we all would), in hearing what any of you use to read web pages, documents and so on... Please feel free to comment your input or suggestions blow.
Have fun!




gespeak was posted on gnomefiles a few days ago too. graphical frontend for espeak
@Vadim P.
Thanks – Very nice!
http://www.gnomefiles.org/app....../Gespeaker and files here: http://www.box.net/shared/mva8.....ngq25l
It’s cool that you can pipe output to it as well. You can do neat little things like:
grep "Jun 19" /var/log/messages | espeakYou can have your computer read your message log to you. Granted, this is kind of dorky but you could apply it to something more useful like creating a Perl script to parse your Thunderbird or Evolution mail file and reading back the email body text to you.