IRC text to speech using the Festival Speech Synthesis System

© Scott C. Kennedy, October 2002


xchat_speak is a small Perl script designed to be used with xchat to act as a bridge between it and the Festival Speech Synthesis System.
Using it allows you to listen to IRC conversations rather than just reading them. This turns out to be quite useful if you want to get on with something else whilst IRC'ing.

The script has been tested on the following Linux versions, but it should work on any system that supports Festival and xchat.

  1. Mandrake 9
  2. RedHat 7.3
  3. RedHat 8.0


November 8th 2002 - v0.3.2 released, Now with fixed return codes, so no more complaints from xchat.
November 7th 2002 - v0.3.1 released, works with Perl 5.8.
October 25th 2002 - v0.3 released First version.
See the top part of the script for a complete list of changes.

Gareth Watts wrote the original code for sirc/kirc that I munged and is available here
Darxus has written a similar script for Irc II available here.

Bits to download

You need:
  1. xchat
  2. The Festival Speech Synthesis System. Pre-compiled binaries are available for some platforms, but it compiles easily enough anyway.
  3. The xchat_speak.pl script

Putting it all together

Follow the respective instructions for installing Festival and xchat. You may want to try the different voices available for Festival since the quality varies quite a bit between them. Some of them are quite sizeable downloads, but it's worth it :-)

Edit the xchat_speak.pl script in a text editor and make sure that the $festival variable is set correctly for your system and that the path to the Perl interpreter is correct on the first line. You also need to make sure that the $voice varilable is set to a voice you have installed.

To have xchat auto load the script, copy the script to your .xchat directory in your home directory.

Or to manually load it, either type '/load ${PATH_TO_SCRIPT}/xchat_speak.pl' or load the script via the GUI.

Connect to your favourite channel. Don't pick one which is too busy else you will probably find that the synthesiser falls behind.

Use the /speechon command to start the synthesiser and /speechoff to turn it off again.

That's it! Assuming that you've already verified that Festival works, you should now be hearing all of your net-friends talking to you, sounding almost exactly as they would in real life given a suitably large quantity of illicit material to consume :->

Abbreviation translator

If you open xchat_speak.pl in your text editor again, you'll see that there is a list of word substitutions near the top. IRC abounds with abbreviations like brb, imho, thx, etc which really doesn't make much sense if spoken literally. This list just expands some of those abbreviations. Feel free to comment out or add to the list.

Also as of v0.3 there is a spelling-correction hash which works in a similar way to the abbreviation translator. Thanks to Dax Kelson for supplying the idea along with a considerable number of entries for the table!

Perhaps you could email in any useful additions.


Please email sck@nogas.org with feedback and submissions related to the script.

Please refer to the festival/xchat pages & authors for queries about their respective projects.