Get Festival Working in Asterisk on Debian after you compile Asterisk from source

Asterisk Programming | Communications

1) apt-get install festival
2) nano /etc/festival.scm
3) paste:


;;; Command for Asterisk begin
(define (tts_textasterisk string mode)
"(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed for
use in server mode so a single function call may synthesize the string.
This function name may be added to the server safe functions."
(utt.send.wave.client (utt.wave.resample (utt.wave.rescale (utt.synth
(eval (list 'Utterance 'Text string))) 5) 8000)))
;;; Command for Asterisk end

4) restart festival / restart asterisk

You should be good to go...