post #4207 02/03/2011 11:03 AM, Hynek Hanke:

Running Festival in server mode brings severe security problems:

which has led distributions (at least Debian and Ubuntu) to stop
shipping an /etc/init.d script with their packages, making it very
hard for an ordinary user to use Festival based speech synthesis
with Speech Dispatcher.

Since this is most likely not going to fix on Festival side and
at least Debian and Ubuntu have declined to work on fixing it, we
need to modify Speech Dispatcher to interface Festival locally.

Festival doesn't offer a local C library API, but the current
code in the Festival module of Speech Dispatcher can be modified
so that it launches the festival binary as a subprocess and then
interfaces it using stdin/stdout. The only complication might be
that the protocol Festival uses for local communication on
stdio is slightly different from the protocol it uses
for communication over inet sockets.

An additional advantage of running Festival as a subprocess
is that it will be autostarted on demand and that autodetection
of Festival synthesis will be more reliable.

post #4552 30/03/2011 03:41 PM, Chris Brannon:

Does anyone know what the differences are between the socket protocol
and the stdio protocol?  Or can someone point me to the appropriate
documentation?  I'd be willing to work on this.

post #4560 30/03/2011 04:30 PM, Hynek Hanke:

Thank you for your interest!

Unfortunatelly, I don't know much details. I know that festival-freebsoft-utils
documentation says that waveform retrieval can only be used in server mode:

Festival outputs the prompt via stdio and I think the form of return values is different.
You don't have the two letter error codes like in server mode and you might get backtraces
printed on the screen.

Gnome-speech used to launch Festival as subprocess. Perhaps some useful
code could be found in it although I'm not sure if they used stdio or shell API.
On the other hand, it didn't retrieve audio, it used Festival itself to play it.

There is also the C/C++ API worth looking into, although I don't know how
much versatile it is:

post #4563 30/03/2011 05:26 PM, Milan Zamazal:

It's possible to save synthesized data to a file using function
and then to read the file yourself.  For instance:

  ( (SynthText "hello") ".../test.wav" nil)

There is festival_text_to_wave function in C API, but it's probably of no use
to Speech Dispatcher as it requires some more processing of the input text.

I doubt the `festival --pipe' mode is easily usable, so using
festival-freebsoft-utils via the C API function festival_eval_command may be a
better idea.

post #47150 27/10/2014 11:46 PM, Luke Yelavich:

I was looking at GNOME Speech's code last week, and found that the festival driver launched Festival in server mode as a subprocess, but also monitored its stdin and stdio file descriptors. I didn't read much further into that code, so I don't know if stdin/stdio are used for anything. My guess was for monitoring for any errors. I'll have another look, as I'd like to get festival back as a first class citizin for Speech DIspatcher.
Total records: 5
Note: You need to log in before you can post comments.