<div>The basic procedure for barge in is:</div><div><br></div><div>1. detect_speech unimrcp <span style="background-color:rgb(249,249,249);line-height:1.1em">{start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000}builtin:grammar/boolean?language=en-US;y=1;n=2</span></div>
<div>2. playback <span style="background-color:rgb(249,249,249);line-height:1.1em">say:please say yes or no. please say no or yes. please say something!</span></div><div>3. handle begin-speaking event</div><div>4. break</div>
<div>5. when playback finishes...  detect_speech start_input_timers</div><div>6. handle detected-speech event</div><div><br></div><div>This is pretty much what play_and_detect_speech already does... see switch_ivr_play_and_detect_speech() in switch_ivr_async.c if you know C.</div>
<br>Chris<br><br><br><div class="gmail_quote">On Wed, Aug 1, 2012 at 1:49 PM, Liu, Xingkun <span dir="ltr">&lt;<a href="mailto:X.Liu@hw.ac.uk" target="_blank">X.Liu@hw.ac.uk</a>&gt;</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>Thanks for your response, Hector!<br>
<br>
Yeah, I am using detect_speech via a similar way to yours.<br>
<br>
What I am more interested in is to use detect_speech app to handle user&#39;s barge-in.<br>
<br>
After Chris mentioned the barge-in can be also handled by detect_speech I gave it a further thinking.<br>
Yeah, I could first &quot;speak&quot; the utterance and immediately resume ASR, then try to catch the begin_speaking event,<br>
then stop the TTS -- using this way to handle the user barge-in.<br>
(Chris, you may have a better idea, would you please let me know if you do?)<br>
<br>
One thing I am worry about is that stopping currently playing media or utterance seems not work for me.<br>
When I recently try &quot;api uuid_break &lt;uuid&gt;&quot; it stopped currently playing music but also stopped playing following utterances<br>
which I sent to TTS soon later on after uuid_break.<br>
<br>
Anyway I will try it further again and let you all know what I will get.<br>
<br>
Cheers,<br>
<br>
Xing</font></p><div class="im"><br></div></div></blockquote></div>