<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Freeswitch-users] Am I using play_and_detect_speech correctly?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Many thanks, Chris!<BR>
<BR>
I will have tries on it later on.<BR>
<BR>
In my original question regarding to too many network connections/much traffic issues,<BR>
I re-setup the destination machine OS the problem seems to have been solved.<BR>
<BR>
So the play_and_detect_speech APP look likes working fine, so I have not yet tried the workaround<BR>
by issuing &quot;detect_speech pause&quot;. I will try it later if there was something unusual happening<BR>
to me after more tests.<BR>
<BR>
So for now I think the problem has been resolved.<BR>
<BR>
Thanks again!<BR>
<BR>
Xing<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: freeswitch-users-bounces@lists.freeswitch.org on behalf of Christopher Rienzo<BR>
Sent: Wed 8/1/2012 20:06<BR>
To: FreeSWITCH Users Help<BR>
Subject: Re: [Freeswitch-users] Am I using play_and_detect_speech correctly?<BR>
<BR>
The basic procedure for barge in is:<BR>
<BR>
1. detect_speech unimrcp<BR>
{start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000}builtin:grammar/boolean?language=en-US;y=1;n=2<BR>
2. playback say:please say yes or no. please say no or yes. please say<BR>
something!<BR>
3. handle begin-speaking event<BR>
4. break<BR>
5. when playback finishes...&nbsp; detect_speech start_input_timers<BR>
6. handle detected-speech event<BR>
<BR>
This is pretty much what play_and_detect_speech already does... see<BR>
switch_ivr_play_and_detect_speech() in switch_ivr_async.c if you know C.<BR>
<BR>
Chris<BR>
<BR>
<BR>
On Wed, Aug 1, 2012 at 1:49 PM, Liu, Xingkun &lt;X.Liu@hw.ac.uk&gt; wrote:<BR>
<BR>
&gt; **<BR>
&gt;<BR>
&gt; Thanks for your response, Hector!<BR>
&gt;<BR>
&gt; Yeah, I am using detect_speech via a similar way to yours.<BR>
&gt;<BR>
&gt; What I am more interested in is to use detect_speech app to handle user's<BR>
&gt; barge-in.<BR>
&gt;<BR>
&gt; After Chris mentioned the barge-in can be also handled by detect_speech I<BR>
&gt; gave it a further thinking.<BR>
&gt; Yeah, I could first &quot;speak&quot; the utterance and immediately resume ASR, then<BR>
&gt; try to catch the begin_speaking event,<BR>
&gt; then stop the TTS -- using this way to handle the user barge-in.<BR>
&gt; (Chris, you may have a better idea, would you please let me know if you<BR>
&gt; do?)<BR>
&gt;<BR>
&gt; One thing I am worry about is that stopping currently playing media or<BR>
&gt; utterance seems not work for me.<BR>
&gt; When I recently try &quot;api uuid_break &lt;uuid&gt;&quot; it stopped currently playing<BR>
&gt; music but also stopped playing following utterances<BR>
&gt; which I sent to TTS soon later on after uuid_break.<BR>
&gt;<BR>
&gt; Anyway I will try it further again and let you all know what I will get.<BR>
&gt;<BR>
&gt; Cheers,<BR>
&gt;<BR>
&gt; Xing<BR>
&gt;<BR>
&gt;<BR>
<BR>
</FONT>
</P>

<br>
<hr>
<br>
<font face="arial, helvetica" size="-1">
<b>Heriot-Watt University is the Sunday Times Scottish University of the Year 2011-2012.</b>
</font>
<br><br>
<font face="arial,helvetica" size="-1">
We invite research leaders and ambitious early career researchers to 
join us in leading and driving research in key inter-disciplinary themes. 
Please see www.hw.ac.uk/researchleaders for further information and how 
to apply. 
</font>
<br><br>
<font face="arial,helvetica" size="-2">
Heriot-Watt University is a Scottish charity registered under charity number SC000278.
<br>
</font>
</BODY>
</HTML>