<HTML>
<HEAD>
<TITLE>Re: [asterisk-users] Asterisk not working with Festival</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Can anyone help please on this?<BR>
<BR>
I tried same configuration on CentOS as well and got same result i.e. No sound and hangup. <BR>
<BR>
<BR>
On 04/08/10 5:58 PM, &quot;Davinder Kumar Meen&quot; &lt;davinder@impingeonline.com&gt; wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello,<BR>
<BR>
I am having a Mac 10.6.4 (Snow Leopard). I have compiled and built Asterisk 1.6.2.9 and Festival 2.0.95:beta on my machine. &nbsp;Asterisk is working fine with SIP channels without Festival. I have written following context in extension.conf:<BR>
<BR>
[connect-to-me]<BR>
exten =&gt; s,1,Answer<BR>
Exten =&gt; s,n,SayDigits(&#8216;1&#8217;)<BR>
exten =&gt; s,n,Festival(hello john)<BR>
exten =&gt; s,n,Hangup<BR>
<BR>
I use call files to make calls to my mobile and once call is answered then asterisk attaches it to &#8220;connect-to-me&#8221; context. But after that, I can hear only a voice saying &#8220;one&#8221; but nothing after that. Please find below details on configuration files:<BR>
<BR>
festival.conf:<BR>
<BR>
; Festival Configuration<BR>
[general]<BR>
host=localhost<BR>
port=1314<BR>
usecache=yes<BR>
cachedir=/var/lib/asterisk/festivalcache/<BR>
festivalcommand=(tts_textasterisk &quot;%s&quot; 'file)(quit)\n<BR>
&nbsp;<BR>
And, festival.scm :<BR>
<BR>
(define (tts_textasterisk string mode)<BR>
&quot;(tts_textasterisk STRING MODE)<BR>
Apply tts to STRING. This function is specifically designed for use in<BR>
server mode so a single function call may synthesize the string. This<BR>
function name may be added to the server safe functions.&quot;<BR>
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))<BR>
(utt.wave.resample wholeutt 8000)<BR>
(utt.wave.rescale wholeutt 5)<BR>
(utt.send.wave.client wholeutt)))<BR>
<BR>
I have placed the above text before the last line which is (provide 'festival). <BR>
<BR>
Below is the debug log shown on asterisk console :<BR>
<BR>
[Aug &nbsp;4 17:50:11] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Channel SIP/gafachi1a-00000000 was answered.<BR>
[Aug &nbsp;4 17:50:11] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching 'Answer'<BR>
[Aug &nbsp;4 17:50:11] &nbsp;&nbsp;&nbsp;&nbsp;-- Executing [s@connect-to-me:1] Answer(&quot;SIP/gafachi1a-00000000&quot;, &quot;&quot;) in new stack<BR>
[Aug &nbsp;4 17:50:11] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching 'SayDigits'<BR>
[Aug &nbsp;4 17:50:11] &nbsp;&nbsp;&nbsp;&nbsp;-- Executing [s@connect-to-me:2] SayDigits(&quot;SIP/gafachi1a-00000000&quot;, &quot;'1'&quot;) in new stack<BR>
[Aug &nbsp;4 17:50:11] DEBUG[17094]: channel.c:3881 set_format: Set channel SIP/gafachi1a-00000000 to write format slin<BR>
[Aug &nbsp;4 17:50:11] DEBUG[17094]: rtp.c:3878 ast_rtp_write: Ooh, format changed from unknown to ulaw<BR>
[Aug &nbsp;4 17:50:11] DEBUG[17094]: rtp.c:3904 ast_rtp_write: Created smoother: format: 4 ms: 20 len: 160<BR>
[Aug &nbsp;4 17:50:11] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (50 requested / 50 actual) timer ticks per second<BR>
[Aug &nbsp;4 17:50:11] &nbsp;&nbsp;&nbsp;&nbsp;-- &lt;SIP/gafachi1a-00000000&gt; Playing 'digits/1.slin' (language 'en')<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (571 requested / 100 actual) timer ticks per second<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (0 requested / 0 actual) timer ticks per second<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (0 requested / 0 actual) timer ticks per second<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: channel.c:2488 ast_settimeout: Scheduling timer at (0 requested / 0 actual) timer ticks per second<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: channel.c:3881 set_format: Set channel SIP/gafachi1a-00000000 to write format ulaw<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: pbx.c:3692 pbx_extension_helper: Launching 'Festival'<BR>
[Aug &nbsp;4 17:50:12] &nbsp;&nbsp;&nbsp;&nbsp;-- Executing [s@connect-to-me:3] Festival(&quot;SIP/gafachi1a-00000000&quot;, &quot;hello john&quot;) in new stack<BR>
[Aug &nbsp;4 17:50:12] &nbsp;&nbsp;== Parsing '/usr/local/etc/asterisk/festival.conf': [Aug &nbsp;4 17:50:12] DEBUG[17094]: config.c:1330 config_text_file_load: Parsing /usr/local/etc/asterisk/festival.conf<BR>
[Aug &nbsp;4 17:50:12] &nbsp;&nbsp;== Found<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: app_festival.c:376 festival_exec: Text passed to festival server : hello john<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: app_festival.c:446 festival_exec: Cache file exists, strln=10, strlen=10<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: app_festival.c:448 festival_exec: Size OK<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: app_festival.c:467 festival_exec: Reading from cache...<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: app_festival.c:491 festival_exec: Passing data to channel...<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: app_festival.c:513 festival_exec: Festival WV command<BR>
[Aug &nbsp;4 17:50:12] DEBUG[17094]: channel.c:3881 set_format: Set channel SIP/gafachi1a-00000000 to write format slin<BR>
[Aug &nbsp;4 17:50:34] DEBUG[17094]: chan_sip.c:3562 __sip_xmit: Trying to put 'SIP/2.0 200' onto UDP socket destined for 67.216.35.162:5060<BR>
<BR>
And, festival server console looks like following:<BR>
<BR>
$ ./bin/festival --server<BR>
server &nbsp;&nbsp;&nbsp;Wed Aug &nbsp;4 17:49:04 2010 : Festival server started on port 1314<BR>
client(1) Wed Aug &nbsp;4 17:50:12 2010 : accepted from localhost<BR>
client(1) Wed Aug &nbsp;4 17:50:12 2010 : disconnected<BR>
<BR>
I have to end the call after sometime. Festival works fine if I got into its console and type SayText(&#8220;hello john&#8221;)<BR>
<BR>
Please let me know how I can fix this.<BR>
<BR>
Thanks,<BR>
Davinder<BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>