These are just some quick notes documenting what I did to get festival working on my Apple MacBook (Intel) in July of 2007. I don't know which of these steps is required on a PPC Mac; if you end up needing to make either of these changes on a PPC Mac please let me know.

  1. Download festival, speech tools, a lexicon, and a voice as normal from the festival download page
  2. Before compiling speech tools get and apply the patch in Brian West's message to festival-talk (I actually don't know if the patch applies cleanly; I just made the changes by hand):
  3. --- ../test/speech_tools/include/EST_math.h     2006-08-03  
    08:49:35.000000000 -0500
    +++ include/EST_math.h  2006-08-17 17:53:33.000000000 -0500
    @@ -43,7 +43,7 @@
    #if defined(__APPLE__)
    /* Not sure why I need this here, but I do */
    -extern "C" int isnan(double);
    +extern "C" int isnan(float);
    #endif
    /* this isn't included from c, but just to be safe... */
    @@ -101,7 +101,6 @@
    /* Apple OSX */
    #if defined(__APPLE__)
    #define isnanf(X) isnan(X)
    -#define isnan(X) __isnan(X)
    #endif
    /* FreeBSD *and other 4.4 based systems require anything, isnanf is  
    defined */
    

    Note (12-9-2008) Leopard broke some stuff. Do this: http://lists.berlios.de/pipermail/festlang-talk/2008-January/002271.html too.

  4. Now go back and follow the normal build instructions for speech tools and festival, expand the lexicon and voice tarballs you downloaded, and test festival.
  5. Everything seemed to work fine for me at this point except the sound output was mostly fuzz. One solution is to edit your festival/lib/siteinit.scm file (you can type 'libdir' (without quotes) in festival if you're not sure where your lib directory is). You need to override the default audio output with a command line utility. There are several such tools available (afplay, qtplay, mplayer, etc.) but I chose to use afplay because it didn't require downloading anything. Add this to your festival/lib/siteinit.scm file:
    (Parameter.set 'Audio_Required_Format 'riff)
    (Parameter.set 'Audio_Command "afplay $FILE")
    (Parameter.set 'Audio_Method 'Audio_Command)
    
  6. Now you need to compile afplay (I had to use sudo to do this, you may not need to):
  7. sudo -s
    cd /Developer/Examples/CoreAudio/Services/AudioFileTools/
    xcodebuild
    xcodebuild install
    exit
    
  8. Now just add afplay to your path (you might want to add this command to your .profile) so festival can find it:
  9. export PATH=$PATH:/Developer/Examples/CoreAudio/Services/AudioFileTools/build/UninstalledProducts/