It was very easy to get festival running,
1. First have fresh install of goautodial 2.4 309a2. login into command line and run " yum install festival "3. edit festival.smc located in /usr/share/festival/
put this code at the bottom of the file :;; set italian voice (comment the following 2 lines to use british_american)
;;(language_italian)
(set! voice_default 'voice_pc_diphone)
;;; 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."
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))
(utt.wave.resample wholeutt 8000)
(utt.wave.rescale wholeutt 5)
(utt.send.wave.client wholeutt)))
;;; Command for Asterisk end
3. Edit festival.conf located in /etc/asterisk/festival.conf you can copy and past this file or simply uncomment the same settings in your file;
; Festival Configuration
;
[general]
;
; Host which runs the festival server (default : localhost);
;
host=localhost
;
;Port on host where the festival server runs (default : 1314)
;
port=1314
;
; Use cache (yes, no - defaults to no)
;
usecache=yes
;
; If usecache=yes, a directory to store waveform cache files.
; The cache is never cleared (yet), so you must take care of cleaning it
; yourself (just delete any or all files from the cache).
; THIS DIRECTORY *MUST* EXIST and must be writable from the asterisk process.
; Defaults to /tmp/
;
cachedir=/var/lib/asterisk/festivalcache/
;
; Festival command to send to the server.
; Defaults to: (tts_textasterisk "%s" 'file)(quit)\n
; %s is replaced by the desired text to say. The command MUST end with a
; (quit) directive, or the cache handling mechanism will hang. Do not
; forget the \n at the end.
;
festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
;
;
4. create a custom context in your extensions.conf to read this [sample]
exten => 555,1,Answer
exten => 555,2,Festival( Festival is working ) ; do NOT use quotes around the string! if you use commas, you will have to escape them with a "\" (backslash).
exten => 555,3,Hangup
4. log back into your command line and run bash>> screen -a
bash>> festival --server
then close your putty window
5 Register your sip extension, assign it the custom context [sample]
6. dial 555 and you will hear your festival server running
Done