Just a quick note. For those of you who are early adopters moving over to OS X 10.7 “Lion”, the method described in my previous tutorial on using IPA fonts with Mac OS X still works and produces good results on Lion.

For what it’s worth, Praat (5.2.29) works just fine as well. :)

So, go forth and Lionize your Mac without phonetic phear.

EDIT: But Lion does hide the library folder. In order to install the keyboard layout, you’ll need to unhide the ~/Library folder or to access it using the Finder’s “Go to folder” option.

Tagged with Computers and Software, Followups | 2 Comments


This is a quick guide on compiling and installing the Festival Text-to-Speech Package on OS X. This was somewhat of a gigantic pain, but eventually, seemed to work fine. The below is a collection

This tutorial assumes you have MacPorts installed from http://www.macports.org/ and can use the port command.

1. Festival and friends seem to work best on a Mac when compiled from the latest sources, obtained from SVN

1a. To install SVN:
sudo port install subversion

1b. Make a directory in your home folder called “tts”:
mkdir ~/tts

1c. Move into that folder:
cd ~/tts

1d. Checkout the latest versions:
svn checkout http://svn.berlios.de/svnroot/repos/festlang/trunk

1e. Copy the “festival”, “speech_tools” and “festvox” folders into the ~/tts folder, using the finder or otherwise.

2. According to , you’ll need to open speech_tools/include/EST_math.h and change:

/* Apple OSX */
#if defined(__APPLE__)
#define isnanf(X) isnan(X)
#define isnan(X) __isnan(X)
#endif

to:

/* Apple OSX */
#if defined(__APPLE__)
#define isnanf(X) isnan(X)
#if (__GNUC__ >= 4)
#define isnan(X) __inline_isnan(X)
#else
#define isnan(X) __isnan(X)
#endif
#endif

3. Now compile speech tools:
cd ~/tts/speech_tools
./configure
make
make test
make install

4. Now compile Festival:
cd ~/tts/festival
./configure
make
make install

5. Now compile festvox
cd ~/tts/festvox
./configure
make

6. Now ready OS X’s audio for this. This next part is stolen (and updated slightly) from :

Fire up Xcode (you do have the Developer Tools installed don’t you?):
File -> Open… /Developer/Examples/CoreAudio/Services/AudioFileTools/AudioFileTools.xcodeproj
Build the project.

Open up a terminal:

sudo mv /Developer/Examples/CoreAudio/Services/AudioFileTools/build/Debug-Tiger/afplay /usr/bin/
sudo chown root:wheel /usr/bin/afplay

If you find yourself missing any of the above files, download a precompiled version of afplay and copy it to /usr/bin/afplay as described above.

7. Open ~/tts/festival/lib/siteinit.scm and add the following:

(Parameter.set 'Audio_Required_Format 'riff)
(Parameter.set 'Audio_Command "afplay $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)

If the file doesn’t exist, create it as a plaintext file such that it contains only the above lines.

8. Go to and download:
festlex_CMU.tar.gz
festlex_OALD.tar.gz
festlex_POSLEX.tar.gz

Then drag the folder inside the festival/lib/dicts folder in that file into ~/tts/festival/lib/dict (create it if it doesn’t exist yet)

Also download:

festvox_kallpc16k.tar.gz

Then drag the festival/lib/voices into ~/tts/festival/lib/ on your machine.

9. Open ~/.profile and add the following lines:

export PATH=/Users/stylerw/tts/festival/bin:/Users/stylerw/tts/speech_tools/bin:$PATH
export ESTDIR="/Users/stylerw/tts/speech_tools"
export FESTVOXDIR="/Users/stylerw/tts/festvox"

9. Don’t bother with the “prompt them” script for recording. It’s a gigantic pain. Instead, do any recordings in . Then, for instance, if you’re recording files for a clock, split the recorded prompts into “time0001.wav”, “time0002.wav”, etc. If you want to attempt “prompt them”, you’ll need to install sox (sudo port install sox) then change any calls to na_play with “play” and the na_record line with ” rec wav/$f.wav trim 0 $duration” (Thanks to ).

10. From there, run whatever tutorial you’d like, you should be good to go. Also, sorry, but I can’t really support this method. Please don’t email me or comment looking for additional tech support information about this.

Enjoy! (and sorry for the exceptionally dry post, but this is a useful bit of information to have out there :))

Tagged with Computers and Software | 3 Comments


Site Information

  • Categories

  • Latest Non-linguistic Posts

  • Archives

  • Site features