Synthesizing Voice From the Command Line
I don't do a lot of audio/video stuff with my system, but the other day I had the urge to see if there was some voice synthesis software available on Linux and it turned out that I already had it installed: it's called Festival. Turns out there are a number of voice synthesis and analysis packages available.
Festival is, according to the 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 [sic] 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.
As far as simple commands, Festival comes with two: saytime and text2wave. Saytime does what you would expect, it speaks the time (as well as outputting the spoken text to stdout). Note though, the time that is output tends to be less than specific:
$ saytime
The time is now, just after half past 10, in the morning.
A wave file of the output is attached (time.wav).
The second command that comes with Festival is text2wave which converts text read from stdin to a .wav file output:
$ echo Your job has completed | text2wave >job.wav
$ aplay job.wav
# OR
$ echo Your job has completed | text2wave | aplay
The wave file is attached (job.wav).
If these commands do not exist on your system you will need to install the festival package. For other voice related packages search the web or check the list here on linux-sound.org
| Attachment | Size |
|---|---|
| job.wav | 58.8 KB |
| time.wav | 140.98 KB |
Mitch Frazier is an Associate Editor for Linux Journal.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- Non-Linux FOSS: libnotify, OS X Style
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Android's Limits
- Web & UI Developer (JavaScript & j Query)
- Reply to comment | Linux Journal
50 min 29 sec ago - Yeah, user namespaces are
2 hours 6 min ago - Cari Uang
5 hours 38 min ago - user namespaces
8 hours 31 min ago - yea
8 hours 57 min ago - One advantage with VMs
11 hours 26 min ago - about info
11 hours 59 min ago - info
12 hours 9 sec ago - info
12 hours 1 min ago - info
12 hours 3 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
Festival voice synthesis software
Hey,
I've been using Festival for 2 years. I use it mainly to get other people's attention. It's easy, it's fun and it's no hassle to install on Mandriva 2008.
Commercial text to speech for Linux
Cepstral is very good and has Linux versions that work well. However, it is not free. I found the voices to be much better quality than festival.
http://cepstral.com/
espeak
espeak is another great program for Synthesizing Voice From the Command Line.
To read a string:
$ espeak "Hello World"
or to read a text file:
$ espeak -f text.txt
To save the output it a WAV file:
$ espeak "Hello World" -w my.wav
It has other options to (Voice, speed, pitch)
Not that one way is better then the other. I just wanted to show that there is another way to do it.
http://filmsbykris.com/
Everything you ever need to know about Open-Source Software.
eSpeak
Ubuntu comes with eSpeak by default. I find that it sounds much better than Festival and I can listen to it for much longer. Orca, which is the screen reader I use on Ubuntu speaks through either speech-dispatcher or gnome-speech, both of which have an eSpeak driver. The comment to which I am replying gives good instructions for how to create a .wav file with eSpeak from the command line.