[Freeswitch-users] Where to set parameter for input timeout

Christopher Rienzo cmrienzo at gmail.com
Wed Sep 14 15:38:56 MSD 2011


You can set MRCP parameters either globally in the MRCP profile with the
<recogparams> tag or on a specific request by prefixing {param="val"} to the
grammar.

Read the MRCP RFCs and the Nuance documentation for all available parameters
and their default values.

For MRCPv1 (RFC 4463):

8.4.5.  No Input Timeout

   When recognition is started and there is no speech detected for a
   certain period of time, the recognizer can send a RECOGNITION-
   COMPLETE event to the client and terminate the recognition operation.
   The no-input-timeout header field can set this timeout value.  The
   value is in milliseconds.  This header field MAY occur in RECOGNIZE,


Shanmugham, et al.           Informational                     [Page 45]

  <http://tools.ietf.org/html/rfc4463#page-46>RFC 4463
<http://tools.ietf.org/html/rfc4463>         MRCP by Cisco, Nuance,
and Speechworks       April 2006


   SET-PARAMS, or GET-PARAMS.  The value for this field ranges from 0 to
   MAXTIMEOUT, where MAXTIMEOUT is platform specific.  The default value
   for this field is platform specific.

     no-input-timeout    =    "No-Input-Timeout" ":" 1*DIGIT CRLF
8.4.6.  Recognition Timeout

   When recognition is started and there is no match for a certain
   period of time, the recognizer can send a RECOGNITION-COMPLETE event
   to the client and terminate the recognition operation.  The
   recognition-timeout parameter field sets this timeout value.  The
   value is in milliseconds.  The value for this field ranges from 0 to
   MAXTIMEOUT, where MAXTIMEOUT is platform specific.  The default value
   is 10 seconds.  This header field MAY occur in RECOGNIZE, SET-PARAMS
   or GET-PARAMS.

     recognition-timeout =    "Recognition-Timeout" ":" 1*DIGIT CRLF

8.4.10.  Recognition Start Timers

   This parameter MAY BE sent as part of the RECOGNIZE request.  A value
   of false tells the recognizer to start recognition, but not to start
   the no-input timer yet.  The recognizer should not start the timers
   until the client sends a RECOGNITION-START-TIMERS request to the
   recognizer.  This is useful in the scenario when the recognizer and
   synthesizer engines are not part of the same session.  Here, when a
   kill-on-barge-in prompt is being played, you want the RECOGNIZE
   request to be simultaneously active so that it can detect and
   implement kill-on-barge-in.  But at the same time, you don't want the
   recognizer to start the no-input timers until the prompt is finished.
   The default value is "true".

     recognizer-start-timers  =    "Recognizer-Start-Timers" ":"
                                   boolean-value CRLF


8.4.12.  Speech Complete Timeout

   This header field specifies the length of silence required following
   user speech before the speech recognizer finalizes a result (either
   accepting it or throwing a nomatch event).  The speech-complete-
   timeout value is used when the recognizer currently has a complete
   match of an active grammar, and specifies how long it should wait for
   more input before declaring a match.  By contrast, the incomplete
   timeout is used when the speech is an incomplete match to an active
   grammar.  The value is in milliseconds.

     speech-complete-timeout = "Speech-Complete-Timeout" ":"
                               1*DIGIT CRLF




Shanmugham, et al.           Informational                     [Page 48]

  <http://tools.ietf.org/html/rfc4463#page-49>RFC 4463
<http://tools.ietf.org/html/rfc4463>         MRCP by Cisco, Nuance,
and Speechworks       April 2006


   A long speech-complete-timeout value delays the result completion
   and, therefore, makes the computer's response slow.  A short speech-
   complete-timeout may lead to an utterance being broken up
   inappropriately.  Reasonable complete timeout values are typically in
   the range of 0.3 seconds to 1.0 seconds.  The value for this field
   ranges from 0 to MAXTIMEOUT, where MAXTIMEOUT is platform specific.
   The default value for this field is platform specific.  This header
   field MAY occur in RECOGNIZE, SET-PARAMS, or GET-PARAMS.
8.4.13.  Speech Incomplete Timeout

   This header field specifies the required length of silence following
   user speech, after which a recognizer finalizes a result.  The
   incomplete timeout applies when the speech prior to the silence is an
   incomplete match of all active grammars.  In this case, once the
   timeout is triggered, the partial result is rejected (with a nomatch
   event).  The value is in milliseconds.  The value for this field
   ranges from 0 to MAXTIMEOUT, where MAXTIMEOUT is platform specific.
   The default value for this field is platform specific.

     speech-incomplete-timeout = "Speech-Incomplete-Timeout" ":"
                                 1*DIGIT CRLF

   The speech-incomplete-timeout also applies when the speech prior to
   the silence is a complete match of an active grammar, but where it is
   possible to speak further and still match the grammar.  By contrast,
   the complete timeout is used when the speech is a complete match to
   an active grammar and no further words can be spoken.

   A long speech-incomplete-timeout value delays the result completion
   and, therefore, makes the computer's response slow.  A short speech-
   incomplete-timeout may lead to an utterance being broken up
   inappropriately.

   The speech-incomplete-timeout is usually longer than the speech-
   complete-timeout to allow users to pause mid-utterance (for example,
   to breathe).  This header field MAY occur in RECOGNIZE, SET-PARAMS,
   or GET-PARAMS.





For MRCPv2:

9.4.6.  No Input Timeout

   When recognition is started and there is no speech detected for a
   certain period of time, the recognizer can send a RECOGNITION-
   COMPLETE event to the client with a Completion-Cause of "no-input-
   timeout" and terminate the recognition operation.  The client can use
   the no-input-timeout header field to set this timeout.  The value is
   in milliseconds and may range from 0 to an implementation specific
   maximum value.  This header field MAY occur in RECOGNIZE,
   "SET-PARAMS" or "GET-PARAMS".  The default value is implementation
   specific.

   no-input-timeout         =  "No-Input-Timeout" ":" 1*19DIGIT CRLF
9.4.7.  Recognition Timeout

   When recognition is started and there is no match for a certain
   period of time, the recognizer can send a RECOGNITION-COMPLETE event
   to the client and terminate the recognition operation.  The
   Recognition-Timeout header field allows the client to set this
   timeout value.  The value is in milliseconds.  The value for this
   header field ranges from 0 to an implementation specific maximum
   value.  The default value is 10 seconds.  This header field MAY occur
   in RECOGNIZE, SET-PARAMS or GET-PARAMS.

   recognition-timeout      =  "Recognition-Timeout" ":" 1*19DIGIT CRLF


9.4.14.  Start Input Timers

   This header field MAY be sent as part of the RECOGNIZE request.  A
   value of false tells the recognizer to start recognition, but not to
   start the no-input timer yet.  The recognizer MUST NOT start the
   timers until the client sends a START-INPUT-TIMERS request to the
   recognizer.  This is useful in the scenario when the recognizer and
   synthesizer engines are not part of the same session.  In such
   configurations, when a kill-on-barge-in prompt is being played (see
   Section 8.4.2
<http://tools.ietf.org/html/draft-ietf-speechsc-mrcpv2-25#section-8.4.2>),
the client wants the RECOGNIZE request to be
   simultaneously active so that it can detect and implement kill-on-
   barge-in.  However, the recognizer SHOULD NOT start the no-input
   timers until the prompt is finished.  The default value is "true".

   start-input-timers  =  "Start-Input-Timers" ":" BOOLEAN CRLF


Burnett & Shanmugham    Expires January 12, 2012               [Page 86]

  <http://tools.ietf.org/html/draft-ietf-speechsc-mrcpv2-25#page-87>Internet-Draft
                  MRCPv2                        July 2011

9.4.15.  Speech Complete Timeout

   This header field specifies the length of silence required following
   user speech before the speech recognizer finalizes a result (either
   accepting it or generating a nomatch event).  The speech-complete-
   timeout value applies when the recognizer currently has a complete
   match against an active grammar, and specifies how long the
   recognizer MUST wait for more input before declaring a match.  By
   contrast, the incomplete timeout is used when the speech is an
   incomplete match to an active grammar.  The value is in milliseconds.

  speech-complete-timeout = "Speech-Complete-Timeout" ":" 1*19DIGIT CRLF

   A long speech-complete-timeout value delays the result to the client
   and therefore makes the application's response to a user slow.  A
   short speech-complete-timeout may lead to an utterance being broken
   up inappropriately.  Reasonable speech complete timeout values are
   typically in the range of 0.3 seconds to 1.0 seconds.  The value for
   this header field ranges from 0 to an implementation specific maximum
   value.  The default value for this header field is implementation
   specific.  This header field MAY occur in RECOGNIZE, "SET-PARAMS" or
   "GET-PARAMS".
9.4.16.  Speech Incomplete Timeout

   This header field specifies the required length of silence following
   user speech after which a recognizer finalizes a result.  The
   incomplete timeout applies when the speech prior to the silence is an
   incomplete match of all active grammars.  In this case, once the
   timeout is triggered, the partial result is rejected (with a
   Completion-Cause of "partial-match").  The value is in milliseconds.
   The value for this header field ranges from 0 to an implementation
   specific maximum value.  The default value for this header field is
   implementation specific.

   speech-incomplete-timeout = "Speech-Incomplete-Timeout" ":" 1*19DIGIT
                                CRLF

   The speech-incomplete-timeout also applies when the speech prior to
   the silence is a complete match of an active grammar, but where it is
   possible to speak further and still match the grammar.  By contrast,
   the complete timeout is used when the speech is a complete match to
   an active grammar and no further spoken words can continue to
   represent a match.

   A long speech-incomplete-timeout value delays the result to the
   client and therefore makes the application's response to a user slow.
   A short speech-incomplete-timeout may lead to an utterance being


Burnett & Shanmugham    Expires January 12, 2012               [Page 87]

  <http://tools.ietf.org/html/draft-ietf-speechsc-mrcpv2-25#page-88>Internet-Draft
                  MRCPv2                        July 2011


   broken up inappropriately.

   The speech-incomplete-timeout is usually longer than the speech-
   complete-timeout to allow users to pause mid-utterance (for example,
   to breathe).  This header field MAY occur in RECOGNIZE, "SET-PARAMS"
   or "GET-PARAMS".




On Wed, Sep 14, 2011 at 6:04 AM, grmt <garmt.noname at gmail.com> wrote:

> Hi, ****
>
> ** **
>
> Not that I have any experience with UniMRCP in combination with Nuance ASR,
> however it seems to me that the MRCP server (i.e. Nuance) tells you that it
> did not receive any input. I believe having read somewhere that the default
> no-input-timeout on Nuance is 8 (s). ****
>
> If you want to manipulate the no-input-timeout on a MRCP request basis, I
> think you will have to change mod_unimrcp.****
>
> You may also manipulate the global request-timout which by default is 10
> (s).****
>
> I bet that if you set this lower than 8(s), it is FS that will timeout …**
> **
>
> ** **
>
> Now why Nuance is not receiving any input (rtp) I don’t know.****
>
> ** **
>
> If I understand correctly from the log below you play a wav file and you
> want that to be recognized?****
>
> Maybe you need a little bit more time between triggering the recognizer and
> playing the wav file?****
>
> You may want to use wireshark to capture the RTP stream between FS and
> NUANCE.****
>
> ** **
>
> Garmt****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Glen
> Ganderton
> *Sent:* Wednesday, September 14, 2011 08:04
> *To:* freeswitch-users at lists.freeswitch.org
> *Subject:* [Freeswitch-users] Where to set parameter for input timeout****
>
> ** **
>
> Hey Guys,****
>
> ** **
>
> Im trying to find where I would set the parameter for input timeout. Im
> using FreeSWITCH as an MRCP client to my Nuance server and what is happening
> is if FreeSWITCH doesn’t detect any speech in around 8-10 seconds I get an
> input-timeout, any idea’s?****
>
> ** **
>
> MRCP/2.0 158 RECOGNIZE 2****
>
> Channel-Identifier: 40 at speechrecog****
>
> Cancel-If-Queue: false****
>
> Content-Type: text/uri-list****
>
> Content-Length: 21****
>
> ** **
>
> session:nuance5-mrcp2****
>
> 2011-09-12 10:30:12.728662 [INFO] mpf_rtp_stream.c:1092 Generate RTCP SR
> [ssrc:2706393383 s:12 o:1920 ts:2160]****
>
> 2011-09-12 10:30:12.728662 [INFO] mpf_rtp_stream.c:1279 Send Compound RTCP
> Packet [BYE] [72 bytes] 10.3.5.80:4017 -> 10.3.15.180:7971****
>
> 2011-09-12 10:30:12.752156 [INFO] mrcp_client_connection.c:525 Receive
> MRCPv2 Stream 10.3.5.80:40061 <-> 10.3.15.180:6075 [69 bytes]****
>
> MRCP/2.0 69 2 200 IN-PROGRESS****
>
> Channel-Identifier: 40 at speechrecog****
>
> ** **
>
> ** **
>
> 2011-09-12 10:30:12.752156 [DEBUG] mrcp_stream.c:382 Parsed MRCP Message
> [69]****
>
> 2011-09-12 10:30:12.752156 [DEBUG] mrcp_client.c:1104 Signal Connection
> Task Message****
>
> 2011-09-12 10:30:12.752156 [DEBUG] mrcp_client.c:974 Receive Connection
> Task Message [3]****
>
> 2011-09-12 10:30:12.752156 [INFO] mrcp_client_session.c:504 Raise App MRCP
> Response 0xb7191d88 <40>****
>
> 2011-09-12 10:30:12.752156 [DEBUG] mod_unimrcp.c:3094 (ASR-8) RECOGNIZE IN
> PROGRESS****
>
> 2011-09-12 10:30:12.752156 [DEBUG] mod_unimrcp.c:1488 (ASR-8) READY ==>
> PROCESSING****
>
> 2011-09-12 10:30:12.752156 [DEBUG] apt_consumer_task.c:90 Wait for Task
> Messages [MRCP Client]****
>
> 2011-09-12 10:30:12.752156 [DEBUG] switch_core_media_bug.c:360 Attaching
> BUG to sofia/internal/1000 at 10.3.5.80****
>
> 2011-09-12 10:30:12.756369 [DEBUG] switch_ivr_play_say.c:1236 Codec
> Activated L16 at 8000hz 1 channels 20ms****
>
> 2011-09-12 10:30:13.388227 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [1000]****
>
> 2011-09-12 10:30:13.388227 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [2000]****
>
> 2011-09-12 10:30:14.388378 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [2000]****
>
> 2011-09-12 10:30:14.388378 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [3000]****
>
> 2011-09-12 10:30:14.976914 [DEBUG] switch_ivr_play_say.c:1573 done playing
> file****
>
> 2011-09-12 10:30:15.387961 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [3000]****
>
> 2011-09-12 10:30:15.387961 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [4000]****
>
> 2011-09-12 10:30:16.388597 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [4000]****
>
> 2011-09-12 10:30:16.388597 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [5000]****
>
> 2011-09-12 10:30:17.387667 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192310 [5000]****
>
> 2011-09-12 10:30:17.387667 [INFO] mpf_rtp_stream.c:1092 Generate RTCP SR
> [ssrc:2706393383 s:244 o:39040 ts:39440]****
>
> 2011-09-12 10:30:17.387667 [INFO] mpf_rtp_stream.c:1230 Send Compound RTCP
> Packet [48 bytes] 10.3.5.80:4017 -> 10.3.15.180:7971****
>
> 2011-09-12 10:30:17.387667 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192310 [10000]****
>
> 2011-09-12 10:30:17.387667 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [5000]****
>
> 2011-09-12 10:30:17.387667 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [6000]****
>
> 2011-09-12 10:30:18.388818 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [6000]****
>
> 2011-09-12 10:30:18.388818 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [7000]****
>
> 2011-09-12 10:30:19.387895 [DEBUG] mpf_timer_manager.c:180 Timer Elapsed
> 0xb7192328 [7000]****
>
> 2011-09-12 10:30:19.387895 [DEBUG] mpf_timer_manager.c:111 Set Timer
> 0xb7192328 [8000]****
>
> 2011-09-12 10:30:19.906918 [INFO] mrcp_client_connection.c:525 Receive
> MRCPv2 Stream 10.3.5.80:40061 <-> 10.3.15.180:6075 [140 bytes]****
>
> MRCP/2.0 140 RECOGNITION-COMPLETE 2 COMPLETE****
>
> Channel-Identifier: 40 at speechrecog****
>
> Waveform-URI:****
>
> Completion-Cause: 002 no-input-timeout****
>
>
> --------------------------------------------------------------------------------------------------------------------------------
> ****
>
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110914/aa66f4d4/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list