Today I’ll be telling you about Festival, a text to speech (TTS) system for Linux that runs from the command line. Yes, I said command line — relax, it does a whole more too…
I should point out that this isn’t meant as a definitive how-to by any means; it’s just what I’ve done on my new Linux rig to replicate the system-wide TTS functionality on my Mac.
I should also point out that I’m not visually impaired — I use TTS software for proofreading. For accessibility there are other more suitable options available.
I was once told that the best way to proofread was to have someone read aloud to you while you follow along, looking at what you’ve written. Since I don’t want to burden my friends and neighbours with the daily task of proofreading my blog posts, what I’ve been doing for some years is copying and pasting the text into SimpleText (the Mac version of WordPad) and using the text to speech (TTS) functionality in that app to get the job done.
It’s best to think of Festival (also eSpeak, and others?) not as an app but as a system-wide framework, like the speech synthesis engine in OS X — with one notable exception: this TTS engine is not limited to a single manufacturer’s apps.
Finding and installing Festival is as simple as searching for it in your package manager of choice (or installing from the terminal if you want to show off). I had read here that the actual voices needed to be installed separately but this wasn’t the case for me. I did have an issue with playback at first, but finding a solution was as easy as copying and pasting the error message into a Google search, which brought me to this handy fix. It’s something to do with the sound I/O in my particular distribution but whatever, it worked.
I learned the proper syntax and was fully prepared to copy large blocks of text into the terminal — that is until I found two very handy plug-ins:
- Read Text – an extension for OpenOffice which immediately brings my Linux install up to TTS parity with OS X;
- Read2Me – an add-on for Firefox so that I never have to leave my web browser to proofread again!
There’s also a plug-in for the Pidgin IM client that uses Festival, along with a multitude of other connectors for it across your system, I imagine.
So, there you have it — TTS solved. If any Linux users have other ingenious uses for Festival post ’em below!