<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Yeah,&nbsp; you suggested to use a silence prompt. Sorry I didn't know
    the format to specify it and didn't realise <br>
    there is an existing specific way to specify it. Now I know :-)<br>
    <br>
    Thanks!<br>
    Xing<br>
    <br>
    <br>
    On 17/11/11 13:37, Christopher Rienzo wrote:
    <blockquote
cite="mid:CAD-qRkiE4p3LqfhHM431X6CVq-vzXX=djiu-Vt08JUE8tJDLng@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div text="#000000" bgcolor="#FFFFFF"> &nbsp; <br>
            &nbsp; After some more tests, I found followings:<br>
            <br>
            &nbsp; 1. Testing from dialplan, the log output is the string of
            "CRIT ${speech_detect_result}" rather than the recognition
            results.<br>
          </div>
        </blockquote>
        <div><br>
          &nbsp; oops <br>
          &nbsp;<br>
        </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div text="#000000" bgcolor="#FFFFFF"> <br>
            &nbsp; 2. Regarding to non barge in, I first send "speak" command
            then send play_and_detect_speech with parameter:<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; detect:unimrcp:nuance5-mrcp1-1
{start-input-timers=false,no-input-timeout=25000,recognition-timeout=25000}dudeYNNC_Nuance<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in which I removed the "say:" part.<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; But very soon I received event
            CHANNEL_EXECUTE_COMPLETE for play_and_detect_speech before
            the text playing finishes,<br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and speech_detect_result is null (actually the event
            header does not contain this variable)<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I tried with "say:" part with empty text like
            "say:unimrcp:en-GB: " but it doesn't work, see issue 3
            below.<br>
          </div>
        </blockquote>
        <div><br>
          Try with silence as I originally suggested:<br>
          <br>
          silence_stream://1000 detect:unimrcp:nuance5-mrcp1-1
          {start-input-timers=false,no-input-timeout=25000,
          recognition-timeout=25000}dudeYNNC_Nuance <br>
        </div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div text="#000000" bgcolor="#FFFFFF"> <br>
            &nbsp; 3. It seems that I can not send "speak" command twice
            before the first one finishes. In my case I run one port TTS
            server on one machine.<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; If I send the command twice FS will give me Synthesizer
            Error/Invalid TTS Module.<br>
            &nbsp;&nbsp;&nbsp;&nbsp; I thought the TTS request would be queued rather than
            it immediately looks for the TTS resource.<br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; If I send the second command to another TTS machine, no
            error occurs but I can only hear one utterance being spoken,<br>
            &nbsp;&nbsp;&nbsp;&nbsp; it looks like one utteraance was dropped somehow.<br>
          </div>
        </blockquote>
        <div><br>
          Wait for speak to finish before starting a new one.<br>
          &nbsp;</div>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div text="#000000" bgcolor="#FFFFFF">
            <div class="im"> <br>
              On 16/11/11 16:51, xl127 wrote: </div>
            <blockquote type="cite">
              <div class="im"> Hi Christopher,<br>
                <br>
                The questions are cleared to me now. Many thanks for
                your explanations!<br>
                <br>
                Best regards,<br>
                <br>
                Xing<br>
                <br>
                <br>
                On 16/11/11 15:52, Christopher Rienzo wrote: </div>
              <blockquote type="cite"><br>
                Responses inline<br>
                <br>
                <br>
                <div class="gmail_quote">
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div text="#000000" bgcolor="#FFFFFF">
                      <div class="im"> Now it works in my ESL app though
                        I am just able to do one dialogue ( I need to
                        add the event catching for furthur dialgoues).<br>
                        <br>
                        I have a couple of questions here:<br>
                        <br>
                        &nbsp; 1. In the first try, my Nuance server was able
                        to be accessed somehow (FS says the MRCP is not
                        responding in 5000ms, <br>
                      </div>
                      &nbsp;&nbsp;&nbsp; something like that), then FS says: [WARNING]
                      rtsp_client.c:386 () Failed to Connect to RTSP
                      Server <a moz-do-not-send="true"
                        href="http://99.185.85.31:554" target="_blank"><font
                          color="red"><b>MailScanner has detected a
                            possible fraud attempt from
                            "99.185.85.31:554" claiming to be</b></font>
                        <font color="red"><b>MailScanner warning:
                            numerical links are often malicious:</b></font>
                        99.185.85.31:554</a>,
                      <div class="im"><br>
                        &nbsp;&nbsp;&nbsp; later FS says: <br>
                        &nbsp;&nbsp;&nbsp;&nbsp; [ERR] mod_unimrcp.c:1860 (TTS-6)
                        SYNTHESIZER channel error!<br>
                        &nbsp;&nbsp;&nbsp;&nbsp; [ERR] switch_ivr_play_say.c:2439 Invalid
                        TTS module!&nbsp; <br>
                        &nbsp;&nbsp;&nbsp; <br>
                        &nbsp;&nbsp; The SYNTHESIZER channel error and Invalid TTS
                        module error are obvious.<br>
                        <br>
                      </div>
                      &nbsp;&nbsp;&nbsp; What I don't understand is why it went to this
                      stange address: <a moz-do-not-send="true"
                        href="http://99.185.85.31:554" target="_blank"><font
                          color="red"><b>MailScanner has detected a
                            possible fraud attempt from
                            "99.185.85.31:554" claiming to be</b></font>
                        <font color="red"><b>MailScanner warning:
                            numerical links are often malicious:</b></font>
                        99.185.85.31:554</a>?<br>
                    </div>
                  </blockquote>
                  <div>
                    <div class="h5">
                      <div><br>
                        check your unimrcp configuration.&nbsp; Make sure the
                        default TTS and ASR profiles are set to actual
                        servers.<br>
                        &nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0pt
                        0pt 0pt 0.8ex;border-left:1px solid rgb(204,
                        204, 204);padding-left:1ex">
                        <div text="#000000" bgcolor="#FFFFFF"> &nbsp; 2. I
                          specified TTS engine in play_and_detect_speech
                          as<br>
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "say:unimrcp:nuance5-mrcp1-1: the
                          text to speak"<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; It works though I didn't specify the TTS
                          voice.<br>
                          <br>
                          &nbsp;&nbsp;&nbsp;&nbsp; How do I specify the TTS voice? In the
                          mrcp profile (how?)? or something like:<br>
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "say:unimrcp:nuance5-mrcp1-1:Serena:
                          the text to speak" (this seems not right.)<br>
                        </div>
                      </blockquote>
                      <div><br>
                        That won't work.&nbsp; Set the tts_engine variable as
                        I explained previously, or use
                        say:unimrcp:voice:text to speak with the desired
                        voice and the correct default TTS profile
                        defined in unimrcp.conf.xml.&nbsp; This is a
                        limitation of the say: notation.&nbsp; Alternatively,
                        the voice can be defined with the tts_voice
                        channel variable.<br>
                        <br>
                        &nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0pt
                        0pt 0pt 0.8ex;border-left:1px solid rgb(204,
                        204, 204);padding-left:1ex">
                        <div text="#000000" bgcolor="#FFFFFF"> &nbsp; 3. The
                          barge-in works well, thanks!. Is the barge-in
                          configurable? In some scenarios, we might not
                          allow barge-in.<br>
                        </div>
                      </blockquote>
                      <div><br>
                        If you don't want to barge in, just do "playback
                        (or speak)" first, then "play_and_detect_speech"
                        with a silence prompt.<br>
                        &nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0pt
                        0pt 0pt 0.8ex;border-left:1px solid rgb(204,
                        204, 204);padding-left:1ex">
                        <div text="#000000" bgcolor="#FFFFFF"> <br>
                          &nbsp; 4. How could I get the text which has spoken
                          to the user when barge-in occurs?<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; Or Could I get the time when barge-in
                          occurs? If I know the barge-in time and rough
                          totale time for the whole text<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; to be spoken I can figure out the spoken
                          text by manually checking the recorded audio
                          file later, which would be painful.<br>
                        </div>
                      </blockquote>
                      <div><br>
                        If this is necessary, you might want to use the
                        lower-level functions instead to watch for the
                        begin-speaking event.<br>
                        &nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0pt
                        0pt 0pt 0.8ex;border-left:1px solid rgb(204,
                        204, 204);padding-left:1ex">
                        <div text="#000000" bgcolor="#FFFFFF"> <br>
                          &nbsp; 5. when I use "speak" and "detect_speech"
                          apps in ESL, I can catch event:
                          DETECTED_SPEECH and speech-type:
                          begin-speaking<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; and "detected-speech", then I do the
                          recognition results processing.<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; <br>
                          &nbsp;&nbsp;&nbsp; The new app play_and_detect_speech seems
                          not generate these events any more. The way
                          that I can think of to get the results<br>
                          &nbsp;&nbsp;&nbsp; is to catch event:CHANNEL_EXECUTE_COMPLETE
                          then check if
                          variable_current_application=play_and_detect_speech,
                          then get<br>
                          &nbsp;&nbsp;&nbsp; the results from
                          variable_detect_speech_result.<br>
                          <br>
                          &nbsp;&nbsp;&nbsp; Is this the proper way to get the results
                          in ESL app? Or will play_and_detect_speech
                          later on be consistent with detect_speech <br>
                          &nbsp;&nbsp;&nbsp; in term of ASR events?<br>
                        </div>
                      </blockquote>
                      <div><br>
                        play_and_detect_speech is a higher level
                        abstraction to simplify things.&nbsp; If you want to
                        have more control, go back to using the ESL
                        events.&nbsp; Reading the code in mod_dptools and
                        switch_ivr_async will give you hints about how
                        to do it correctly.<br>
                        &nbsp;</div>
                      <blockquote class="gmail_quote" style="margin:0pt
                        0pt 0pt 0.8ex;border-left:1px solid rgb(204,
                        204, 204);padding-left:1ex">
                        <div text="#000000" bgcolor="#FFFFFF"> <br>
                          &nbsp; 6. I'd like to set start-input-timers=false
                          in the initial request then start the
                          recognition timers (start-input-timers=true)<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; after the TTS finishes.<br>
                          &nbsp;&nbsp;&nbsp;&nbsp; How possibly could I do this?<br>
                        </div>
                      </blockquote>
                      <div><br>
                        This is automatically done in the&nbsp;
                        switch_ivr_play_and_detect_speech() function.&nbsp;
                        You just need to specify
                        start-input-timers=false in the beginning.<br>
                      </div>
                    </div>
                  </div>
                </div>
                <div>
                  <div class="h5"> <br>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a moz-do-not-send="true" href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a moz-do-not-send="true" href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a moz-do-not-send="true" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
                  </div>
                </div>
              </blockquote>
              <div>
                <div class="h5"> <br>
                  <br>
                  <hr> <br>
                  <img src="cid:part1.06020107.04020601@hw.ac.uk"
                    alt="Scottish University of the Year 2011-12"
                    align="left"> <font face="arial,helvetica"> &nbsp; <b>Heriot-Watt
                      University is the Sunday Times<br>
                      &nbsp; Scottish University of the Year 2011-2012</b> </font>
                  <br>
                  <br>
                  <font face="arial,helvetica" size="-1"> &nbsp; Heriot-Watt
                    University is a Scottish charity<br>
                    &nbsp; registered under charity number SC000278. <br>
                  </font> <br>
                  <fieldset></fieldset>
                  <br>
                  <pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a moz-do-not-send="true" href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a moz-do-not-send="true" href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a moz-do-not-send="true" href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a moz-do-not-send="true" href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a moz-do-not-send="true" href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a moz-do-not-send="true" href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
                </div>
              </div>
            </blockquote>
            <br>
            <br>
            <hr>
            <br>
            <img src="cid:part2.08090806.07060601@hw.ac.uk"
              alt="MailScanner Signature HW" align="left">
            <font face="arial,helvetica">
              &nbsp; <b>Heriot-Watt University is the Sunday Times
                <div class="im"><br>
                  &nbsp; Scottish University of the Year 2011-2012</div>
              </b>
            </font>
            <br>
            <div class="im"><br>
              <font face="arial,helvetica" size="-1">
                &nbsp; Heriot-Watt University is a Scottish charity<br>
                &nbsp; registered under charity number SC000278.
                <br>
              </font>
            </div>
          </div>
          <br>
_________________________________________________________________________<br>
          Professional FreeSWITCH Consulting Services:<br>
          <a moz-do-not-send="true"
            href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
          <a moz-do-not-send="true"
            href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
          <br>
          FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
          <a moz-do-not-send="true" href="http://www.cudatel.com"
            target="_blank">http://www.cudatel.com</a><br>
          <br>
          Official FreeSWITCH Sites<br>
          <a moz-do-not-send="true" href="http://www.freeswitch.org"
            target="_blank">http://www.freeswitch.org</a><br>
          <a moz-do-not-send="true" href="http://wiki.freeswitch.org"
            target="_blank">http://wiki.freeswitch.org</a><br>
          <a moz-do-not-send="true" href="http://www.cluecon.com"
            target="_blank">http://www.cluecon.com</a><br>
          <br>
          FreeSWITCH-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
            target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
          UNSUBSCRIBE:<a moz-do-not-send="true"
            href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
            target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
          <a moz-do-not-send="true" href="http://www.freeswitch.org"
            target="_blank">http://www.freeswitch.org</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  <br>
<hr>
<br>
<img src="cid:hw_uni_of_year.jpg" align=left 
alt="MailScanner Signature HW">
<font face="arial,helvetica">
&nbsp; <b>Heriot-Watt University is the Sunday Times<br> 
&nbsp; Scottish University of the Year 2011-2012</b>
</font>
<br><br>
<font face="arial,helvetica" size="-1">
&nbsp; Heriot-Watt University is a Scottish charity<br>
&nbsp; registered under charity number SC000278.
<br>
</font>

</body>
</html>