This should work in more than Ubuntu; but I use Ubuntu:
printf ";use ALSA\n(Parameter.set 'Audio_Method 'Audio_Command)\n(Parameter.set 'Audio_Command \"aplay -q -c 1 -t raw -f s16 -r \$SR \$FILE\")\n" > .festivalrc
From the Ubuntu forums:
http://ubuntuforums.org/showthread.php?t=171182&page=2