You are missing the tts_engine. Set the tts_engine channel variable to "unimrcp:nuance5-mrcp1-1" or set the default tts profile to nuance5-mrcp1-1 in the unimrcp.conf.xml file and use "say:unimrcp:text to speak" <br>
<br><br><div class="gmail_quote">On Wed, Nov 16, 2011 at 7:36 AM, Liu, Xingkun <span dir="ltr"><<a href="mailto:X.Liu@hw.ac.uk">X.Liu@hw.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div>
<p><font size="2">Great work, thanks Christopher!<br>
<br>
I've quick tested it from the dialplan based on the example. It works on my setup.<br>
<br>
Now I am trying to put it into my Java ESL app, FS complains:<br>
<br>
switch_ivr_play_say.c:1167 Invalid Args<br>
<br>
A piece of codes I am using:<br>
<br>
SendMsg msg = new SendMsg();<br>
msg.addCallCommand("execute");<br>
msg.addExecuteAppName("play_and_detect_speech");<br>
String arg = "say:" + utt + " detect:unimrcp:nuance5-mrcp1-1 {start-input-timers=false,no-input-timeout=5000,"<br>
+ "recognition-timeout=5000}" +this.crntGrammar;<br>
msg.addExecuteAppArg(arg);<br>
EslMessage response = sendSyncMultiLineCommand(channel, msg.getMsgLines());<br>
<br>
Is there something I am missing?<br>
<br>
Cheers,<br>
<br>
Xing</font></p><div><div class="h5"><font size="2"><br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> on behalf of Christopher Rienzo<br>
Sent: Tue 11/15/2011 20:05<br>
To: FreeSWITCH Users Help<br>
Subject: Re: [Freeswitch-users] How to implement TTS barge-in using FS ESL<br>
<br>
Latest version of FreeSWITCH now has<br>
<a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_detect_speech" target="_blank">http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_play_and_detect_speech</a><br>
Give it a try and let us know if there is anything that can be improved.<br>
<br>
<br>
<br>
On Mon, Nov 14, 2011 at 12:06 PM, xl127 <<a href="mailto:x.liu@hw.ac.uk" target="_blank">x.liu@hw.ac.uk</a>> wrote:<br>
<br>
> The way you did and described here is similar to what I wanted.<br>
> I want to set start-input-timers=false in the initial setup, then start<br>
> the recognition timer once the TTS finishes playing the prompt.<br>
> I do not use input callback as I am using ESL event (Java ESL Client<br>
> 0.9.2).<br>
><br>
> I've not yet figured out how to know the prompt playing has finished, how<br>
> to stop the TTS and how to start the input timer.<br>
> I didn't get many events when I did barge-in: only got two CHANNEL_EXECUTE<br>
> and CAHNNEL_EXECUTE_COMPLETE events.<br>
> so didn't get the DETECTED_SPEECH at this point.<br>
><br>
> In principle it shouldn't stop FS generating events when barging in, so<br>
> there must be somethings wrong in my setup.<br>
><br>
> From Examples_directory_lua_asr_tts in the wiki, it mentions the session<br>
> needs to sleep for a few seconds before getting the results.<br>
> I tried but it didn't help.<br>
><br>
><br>
><br>
><br>
> On 14/11/11 14:48, Christopher Rienzo wrote:<br>
><br>
> I'm not sure why it locks up for you. It works for me and I know of at<br>
> least one other developer that got it all to work.<br>
><br>
> The way I do it in my custom APP is to set {start-input-timers=false} in<br>
> the speech recognition request and register an input callback function to<br>
> deal with the recognition and DTMF events. The input callback reacts to<br>
> the start of speech and recognition complete events by stopping the<br>
> prompt. At start of speech, the input timers are started and silence is<br>
> played until the final result arrives from the recognizer (no match, match,<br>
> etc).<br>
><br>
> An alternative way to do this is to watch for the recognition events over<br>
> ESL and react to them.<br>
><br>
><br>
><br>
> On Mon, Nov 14, 2011 at 9:19 AM, xl127 <<a href="mailto:x.liu@hw.ac.uk" target="_blank">x.liu@hw.ac.uk</a>> wrote:<br>
><br>
>> Hi Christopher,<br>
>><br>
>> That will be great! Thanks and looking forward to your app!<br>
>><br>
>> By the way, do you have a quick thoughts about the reasons the FS stucks<br>
>> when garge-in occurs?<br>
>> Otherwise if it is not straightforward to explain it, just leave it<br>
>> alone until your new app comes out.<br>
>><br>
>> Cheers,<br>
>> Xing<br>
>><br>
>><br>
>><br>
>><br>
>> On 14/11/11 13:23, Christopher Rienzo wrote:<br>
>><br>
>> I'll write up a dialplan app this week to deal with this. Getting tired<br>
>> of being asked the same question over and over since it's too complicated<br>
>> as is currently designed :)<br>
>><br>
>><br>
>><br>
>><br>
>> On Mon, Nov 14, 2011 at 8:07 AM, xl127 <<a href="mailto:x.liu@hw.ac.uk" target="_blank">x.liu@hw.ac.uk</a>> wrote:<br>
>><br>
>>> Hi,<br>
>>><br>
>>> The first problem I need to solve is that FS stucks when I speak during<br>
>>> the prompt is playing.<br>
>>> It looks like the recognizer is not listening any more. It works fine if<br>
>>> I speak after the playing prompt finishes.<br>
>>><br>
>>> I tried Nuance and PocketSphinx recognizers and got same problem.<br>
>>><br>
>>> Any idea about what the possible causes are?<br>
>>><br>
>>> Thanks!<br>
>>> Xing<br>
>>><br>
>>><br>
>>> On 11/11/11 18:59, xl127 wrote:<br>
>>> > Hello,<br>
>>> ><br>
>>> > I found this is a question that was asked before by others, but I<br>
>>> didn't<br>
>>> > find the answer.<br>
>>> ><br>
>>> > Anyway, I am using FS ESL outbound mode connecting to my IVR app,<br>
>>> using<br>
>>> > FS's "speak"<br>
>>> > and "detect_speech" to access Nuance MRCP V1 server.<br>
>>> ><br>
>>> > I want the user to be able to barge-in during the system's speaking.<br>
>>> > How could I implement it?<br>
>>> ><br>
>>> > I tried to specify "kill-on-barge-in=true" in the mrcp config profile.<br>
>>> > The barge-in doesn't work.<br>
>>> ><br>
>>> > With or without setting kill-on-barge-in, FS stops responding to my<br>
>>> > phone call and<br>
>>> > eventually it hangs up my call if I speak somthing (do the barge-in)<br>
>>> > during the system's speaking.<br>
>>> ><br>
>>> > I made a turn-by-turn loop in my app, the ASR/TTS works fine if I do<br>
>>> not<br>
>>> > do barge-in ( I wait until the TTS finishes then I start to speak)<br>
>>> ><br>
>>> > Any advices please?<br>
>>> ><br>
>>> > Thanks!<br>
>>> > Xing<br>
>>> ><br>
>>> ><br>
>>> ><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Heriot-Watt University is a Scottish charity<br>
>>> registered under charity number SC000278.<br>
>>><br>
>>> Heriot-Watt University is the Sunday Times<br>
>>> Scottish University of the Year 2011-2012<br>
>>><br>
>>><br>
>>><br>
>>> _________________________________________________________________________<br>
>>> Professional FreeSWITCH Consulting Services:<br>
>>> <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
>>> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>>><br>
>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>>> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>>><br>
>>> Official FreeSWITCH Sites<br>
>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>>><br>
>>> FreeSWITCH-users mailing list<br>
>>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>><br>
>><br>
>><br>
>><br>
>> _________________________________________________________________________<br></font></div></div><font size="2">
>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://<a href="http://www.freeswitchsolutions.com" target="_blank">www.freeswitchsolutions.com</a><div class="im"><br>
>><br>
>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://<a href="http://www.cudatel.com" target="_blank">www.cudatel.com</a><br>
>><br>
>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://<a href="http://www.cluecon.com" target="_blank">www.cluecon.com</a><br>
>><br>
>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org</a><br>
>><br>
>><br>
>><br></div>
>> ------------------------------<br>
>><br>
>> [image: Scottish University of the Year 2011-12] *Heriot-Watt<div class="im"><br>
>> University is the Sunday Times<br>
>><br>
>> Scottish University of the Year 2011-2012<br></div><div class="im">
>> *<br>
>><br>
>> Heriot-Watt University is a Scottish charity<br>
>> registered under charity number SC000278.<br>
>><br>
>> _________________________________________________________________________<br>
>> Professional FreeSWITCH Consulting Services:<br>
>> <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
>> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
>><br>
>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
>> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
>><br>
>> Official FreeSWITCH Sites<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
>> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
>><br>
>> FreeSWITCH-users mailing list<br>
>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
>><br>
><br>
><br>
> _________________________________________________________________________<br></div>
> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://<a href="http://www.freeswitchsolutions.com" target="_blank">www.freeswitchsolutions.com</a><div class="im"><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://<a href="http://www.cudatel.com" target="_blank">www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://<a href="http://www.cluecon.com" target="_blank">www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org</a><br>
><br>
><br>
><br></div>
> ------------------------------<br>
><br>
> [image: Scottish University of the Year 2011-12] *Heriot-Watt<div class="im"><br>
> University is the Sunday Times<br></div>
> Scottish University of the Year 2011-2012*<div class="im"><br>
><br>
> Heriot-Watt University is a Scottish charity<br>
> registered under charity number SC000278.<br>
><br>
> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>
> <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
> <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
><br>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
> <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
> <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
> <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
</div></font>
<p></p><div class="im">
<br>
<hr>
<br>
<img src="cid:hw_uni_of_year.jpg" alt="Scottish University of the Year 2011-12" align="left">
<font face="arial,helvetica">
<b>Heriot-Watt University is the Sunday Times<br>
Scottish University of the Year 2011-2012</b>
</font>
<br><br>
<font face="arial,helvetica" size="-1">
Heriot-Watt University is a Scottish charity<br>
registered under charity number SC000278.
<br>
</font>
</div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>