Installed festival using yum install festival*
(festival-1.95-5.2.1.i386, festival-devel-1.95-5.2.1.i386)
Edited file /usr/share/festival/festival.scm adding the following lines at the end
;;=============================================
;; Enable access to localhost (needed by debian users)
(set! server_access_list '(“localhost\.localdomain” “localhost”))
;;; 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
;;=============================================
To the /usr/share/festival.scm, added the following lines to end of file
(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)))
(provide 'festival) ; this line has been there in this file
In the extensions.conf, added the following
exten => 02,1,Ringing
exten => 02,n,Wait(2)
exten => 02,n,Answer()
;tried with & without doublequotes inside Festival()
exten => 02,n,Festival(“hello sanju i am festival”)
exten => 02,n,Hangup()
Started festval server by cmd festival --server
o/p:
server Tue Sep 8 05:57:04 2009 : Festival server started on port 1314
Started asterisk server by cmd, asterisk -vvvvvvc
I am using x-lite softphone for testing purpose. When i call
after ringing i dont hear any sound, and also the call never hangsup.
In festival console i get the following
server Tue Sep 8 06:10:05 2009 : Festival server started on port 1314
client(1) Tue Sep 8 06:10:12 2009 : accepted from localhost
client(1) Tue Sep 8 06:10:12 2009 : disconnected
In asterisk console i get the op as
[b]Launching ‘Festival’
– Executing [02@incoming:4] Festival(“SIP/100-09b82b60”, “hello sanju i am festival”) in new stack
Parsing /etc/asterisk/festival.conf
== Parsing ‘/etc/asterisk/festival.conf’: == Found
Text passed to festival server : hello sanju i am festival
Cache file exists, strln=25, strlen=25
Size OK
Reading from cache…
Passing data to channel…
Festival WV command
Stopping retransmission on ‘MDA2YjU1MmFkYzVjMTEyY2QwYzdiODg1YzFjNWVmNDU.’ of Response 2: Match Found
Set channel SIP/100-09b82b60 to write format slin[/b]
In the /var/lib/asterisk/festivalcache there is some file being created as a part of festival cache, with file name 97C83A796EA9A6F5085FC643AD87A1