Text-to-speech in PHP

It's been a while since I've played with the open source Festival TTS software, and I'm pretty impressed with the quality of the speech output. Some of the voices that are available sound so much better than the old diphone-based voices that evoke WOPR from War Games.

This got me thinking it'd be fun to integrate some of this functionality into a web application. A quick search and I discovered Tony Bhimani's Linux Text-To-Speech Tutorial which has a sample PHP application that uses the Festival text2wave utility and the lame mp3 encoder to produce mp3 files from user submitted text.

I mentioned that some of the voices are pretty outstanding. In particular, the "unit selection" voices, demonstrated on the Festival demo page, are able to synthesize a lot of sentences with few noticeable glitches. These voices sound so nice because they contain a much larger database of common sound units, only falling back on heavy processed output on less common utterances. There's a howto and discussion over on Ubuntu Forums that'll guide you through installing and using the more enhanced voices with Festival. With a decent voice file, Festival, and an adaptation of Tony's PHP text-to-speech demonstration, it wouldn't be too hard to add audio output to your blog or create a script that turns your RSS feeds into a podcast for the daily commute.

Have any of your own text-to-speech ideas or demos? Please share them in the comments!

Tony Bhimani - PHP Text-To-Speech Example
The Festival Speech Synthesis System
HOWTO: Make Festival TTS Use Better Voices

Posted by Jason Striegel | Aug 20, 2008 09:57 PM
Linux, Linux Multimedia, Podcasting, Web | Permalink | Comments (1) Bookmark and Share

Recent Entries

Comments

Newest comments listed first.

Posted by: kyoorius on August 21, 2008 at 8:39 AM

php text-to-speech through deep linking m-w.com concept

Here's a little hack I did back when m-w.com first introduced their "hear the word" feature on their site.
You need to have popups enabled because the javascript pops up the audio into a separate window.

http://www.datawhorehouse.com/sayit/

The source code is linked from that page also.


Leave a comment



Bloggers

Welcome to the Hacks Blog!

Brian Jepson.Brian Jepson


Jason Striegel.Jason Striegel


Philip Torrone.Phillip Torrone



See all of the books in the Hacks Series!
Advertise here.

Recent Posts

www.flickr.com
photos in Hacks More photos in Hacks