I currently have festival 2.4 installed and configured.
Heres what I'm doing:
I first use ./bin/festival
to get into the festival prompt.
Then do (SayText "test")
which should have the tts speak the word test
Now when I have festival 2.1 installed using apt-get from the repository this command works as expected, it says "test"
However when running from manually-built festival 2.4 it reports no error, but also no sound. I have used set parameter commands and tried every audio method, also tried the set parameter command with Audio_Device
and tried many of the devices from /dev/ and /dev/snd/ on my system to no avail.
Note that oss-compat is installed, I saw that listed as a solution somewhere and it was already installed from when I built cmu sphinx a while back.
My question is what is apt-get doing that I'm not. I've been at this for about 12 hours now so any ideas are welcome.
Update: I have used strace to monitor the calls festival is making to the system in an attempt to find out whats causing this, heres what I've come up with:
My system has multiple audio deivces connected to it, the integrated audio on the motherboard which is fried, the hdmi outputs of the nvidia card, and a usb audio device I'm using for the time being. ls /dev/
shows three audio devices, as expected /dev/audio
, /dev/audio2
, and /dev/audio3
. Setting festival to use the first two with (Parameter.set 'Audio_Device "/dev/audio")
did the same thing as before, no error but also no sound. However when using the third device /dev/audio3
I get Linux: can't open /dev/audio3
upon further investigation with aforementioned strace I discovered this:
open("/dev/audio3", O_WRONLY) = -1 EBUSY (Device or resource busy)
I searched around a bit and the only mentions of this error I can find are for specialized cases for whatever the person in question was doing.
You simply need to configure Pulseaudio. Add these lines to the end of your ~/.festivalrc
file, or to /usr/share/festival/festival.scm
:
(Parameter.set 'Audio_Required_Format 'aiff)
(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Command "paplay $FILE --client-name=Festival --stream-name=Speech")