After starting up another Grails project and completely missing my text-to-speech solution for long build times, I decided to do something a little more re-usable.

I just released a Grails plugin that provides this functionality. It’s as simple as: 

grails install-plugin nadd-neutralizer

Right now, only Mac OS X is supported. Patches are welcome for other operating systems. Source code is here:

About the Author:

Learned something? Great! Need help on your development project? I can help @ Brilliant Chemistry or get in touch direct:

  • Ruby on Rails
  • iOS Development
  • System Architecture & Performance

Get in touch:


  1. Jeroen says:

    Hey Mike,

    Excellent plugin, I really like it 😀 However, as I work collaboratively on a project with also Linux and Windows users, the plugin breaks the windows user’s codebase (and possible also the Linux codebase). Could you please add something like this to the plugin?

    if ([“”] == “Mac OS X”) { … }

    This allows the plugin to remain in our repository without other platform’s code… 🙂 Perhaps even extend it by checking of other text to speech options on other platforms? 🙂



    • mike says:

      I was looking for that the other day. I’ll add it shortly.

      I’d definitely like to see support for at least Linux, if not Windows. But I’m relying on contributions there. Someone commenting on the other post about this said they could do it in Linux. Hoping to hear back.

    • mike says:

      I just updated the plugin to 0.2 with the check you provided. Unfortunately, I couldn’t test it on non Mac platforms. Let me know if it borks out for you.

    • Jeroen says:

      Hi Mike,

      Sorry for the delay, I just read your reply… Thanks for adding the IF statement to the plugin! I just updated the plugin in our project and it seems to work and does not break other platform’s code anymore. Some of my colleagues are running Linux, perhaps I can persuade them to provide you with a Linux implementation 😉



      • mike says:


        And even if they could just point out what they think is the most common or best quality TTS engine on Linux, that would help.

        • Tjeerd says:

          I am one of the colleagues of Jeroen and I managed to get it running with Festival under Ubuntu. There are several things I had to do. First install the Festival TTS-engine with ‘sudo apt-get install festival’. By default Festival uses obsolete OSS-emulation (/dev/dsp) which happens to generate a “device is already busy” problem on my computer.

          The fix for that is to run the following command from your home-directory:

          printf “;use ALSAn(Parameter.set ‘Audio_Method ‘Audio_Command)n(Parameter.set ‘Audio_Command “aplay -q -c 1 -t raw -f s16 -r $SR $FILE”)n” > .festivalrc

          This will create a festival run commands file used by Festival to use the correct sound emulation driver.

          Next the following code needs to be put in the _Events.groovy-script:

          if([“”] == “Linux”) {
          String.metaClass.say = {
          def message = “echo “${delegate}””.execute()
          def speechengine = “festival –tts”.execute()
          message | speechengine

          It’s working fine here in Ubuntu 9.10. Thanks for making this funny plugin.

  2. Jeroen says:

    LOL! 😀

    String.metaClass.say = {
    println “FUCK!”


  3. Maciej says:

    It seems like there was a bug on linux version. The “festival –tts” needs to have double “-“.

  4. Maciej says:

    (whitch the comment engine automaticaly replaces with single long -)

Leave a Comment