Compiling Festival on an Intel Mac

This guide will help you get Festival running on the Intel flavor of OS X. Some of this information was gleaned from the festival-talk mailing list. The edits to EST_math.h are my own kludge. I'm pretty sure the C++ style police would shoot me on site if they could find me. Whatever... it compiles doesn't it?

Before You Start

Make sure you've got all the latest stuff:
http://festvox.org/packed/festival/latest/

Put all the archives in the same directory and unpack them in that directory.

Patch the Speech Tools

Open up speech_tools/include/EST_math.h in your favorite editor.
Change lines 101-105 from:

/* 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

Compile/Install

Compile the speech tools following the normal instructions in the INSTALL file.

cd <path to>/speech_tools ./configure make make test make install

Compile festival following the normal instructions in the INSTALL file.

cd ../festival make make install

Setup Audio Output

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/Development-Panther/afplay /usr/bin/ sudo chown root:wheel /usr/bin/afplay

Open up festival/lib/siteinit.scm in your favorite editor and add the following lines: (Parameter.set 'Audio_Required_Format 'riff) (Parameter.set 'Audio_Command "afplay $FILE") (Parameter.set 'Audio_Method 'Audio_Command)

Patch Multisyn Voices

If you're using any multisyn voices you'll need to do a little patching to get them to load correctly. This example uses the festvox_cstr_us_awb_arctic_multisyn-1.0 voice. Change the paths and filenames accordingly. Open up festival/lib/voices-multisyn/english/cstr_us_awb_arctic_multisyn/festvox/cstr_us_awb_arctic_multisyn.scm in your favorite editor and add the line:

(define voice_us_awb_multisyn_configure_pre nil)

...somewhere near the top. Note that the variable you're defining isn't a verbatim copy of the voice's file name!! It leaves out the "cstr" and the "arctic".

Voila!