2 app_festival is an application that allows one to send text-to-speech commands
3 to a background festival server, and to obtain the resulting waveform which
4 gets sent down to the respective channel. app_festival also employs a waveform
5 cache, so invariant text-to-speech strings ("Please press 1 for instructions")
6 do not need to be dynamically generated all the time.
10 1) festival, patched to produce 8khz waveforms on output. Patch for Festival
11 1.4.2 RELEASE are included. The patch adds a new command to festival
14 It is possible to run Festival without patches in the source-code. Just
15 add this to your /etc/festival.scm or /usr/share/festival/festival/scm:
17 (define (tts_textasterisk string mode)
18 "(tts_textasterisk STRING MODE)
19 Apply tts to STRING. This function is specifically designed for
20 use in server mode so a single function call may synthesize the string.
21 This function name may be added to the server safe functions."
22 (let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))
23 (utt.wave.resample wholeutt 8000)
24 (utt.wave.rescale wholeutt 5)
25 (utt.send.wave.client wholeutt)))
27 [See the comment with subject "Using Debian
28 festival >= 1.4.3-15 (no recompiling needed!)" on
29 http://www.voip-info.org/wiki-Asterisk+festival+installation for the
30 original mentioning of it]
32 2) You may wish to obtain and install the asterisk-perl
33 module by James Golovich <james@gnuinter.net>, from
34 either CPAN, or his site: http://asterisk.gnuinter.net,
35 as this contains a good example of how variable text
36 can be tts'd via asterisk, namely the examples/tts-*.agi
37 files there. It has been noted that the current expression
38 evaluation capabilities of asterisk are not best suited
39 for the generation and manipulation of text. AGI scripting
40 can be ideal for these sorts of needs. For simpler usage,
41 fixed, pre-recorded messages may be more amenable for your
44 3) Before running asterisk, you have to run festival-server with a command
47 /usr/local/festival/bin/festival --server > /dev/null 2>&1 &