RFC 4463 - A Media Resource Control Protocol (MRCP) Develope(5)

时间:2006-11-02 来源: 作者: 点击:
/new-audio-channel;Section8.4.21 /speech-language;Section8.4.22 ParameterSupportMethods/Events confidence-thresholdMANDATORYSET-PARAMS,RECOGNIZE GET-RESULT sensitivity-levelOptionalSET-PARAMS,GET-PAR
  
                         /    new-audio-channel        ; Section 8.4.21
                         /    speech-language          ; Section 8.4.22

     Parameter                Support   Methods/Events

     confidence-threshold     MANDATORY SET-PARAMS, RECOGNIZE
                                        GET-RESULT
     sensitivity-level        Optional  SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE
     speed-vs-accuracy        Optional  SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE
     n-best-list-length       Optional  SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE, GET-RESULT
     no-input-timeout         MANDATORY SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE

     recognition-timeout      MANDATORY SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE
     waveform-url             MANDATORY RECOGNITION-COMPLETE
     completion-cause         MANDATORY DEFINE-GRAMMAR, RECOGNIZE,
                                        RECOGNITON-COMPLETE
     recognizer-context-block Optional  SET-PARAMS, GET-PARAMS
     recognizer-start-timers  MANDATORY RECOGNIZE
     vendor-specific          MANDATORY SET-PARAMS, GET-PARAMS
     speech-complete-timeout  MANDATORY SET-PARAMS, GET-PARAMS
                                        RECOGNIZE
     speech-incomplete-timeout MANDATORY SET-PARAMS, GET-PARAMS
                                        RECOGNIZE
     dtmf-interdigit-timeout  MANDATORY SET-PARAMS, GET-PARAMS
                                        RECOGNIZE
     dtmf-term-timeout        MANDATORY SET-PARAMS, GET-PARAMS
                                        RECOGNIZE
     dtmf-term-char           MANDATORY SET-PARAMS, GET-PARAMS
                                        RECOGNIZE
     fetch-timeout            MANDATORY SET-PARAMS, GET-PARAMS
                                        RECOGNIZE, DEFINE-GRAMMAR
     failed-uri               MANDATORY DEFINE-GRAMMAR response,
                                        RECOGNITION-COMPLETE
     failed-uri-cause         MANDATORY DEFINE-GRAMMAR response,
                                        RECOGNITION-COMPLETE
     save-waveform            MANDATORY SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE
     new-audio-channel        MANDATORY RECOGNIZE
     speech-language          MANDATORY SET-PARAMS, GET-PARAMS,
                                        RECOGNIZE, DEFINE-GRAMMAR

8.4.1.  Confidence Threshold

   When a recognition resource recognizes or matches a spoken phrase
   with some portion of the grammar, it associates a confidence level
   with that conclusion.  The confidence-threshold parameter tells the
   recognizer resource what confidence level should be considered a
   successful match.  This is an integer from 0-100 indicating the
   recognizer’s confidence in the recognition.  If the recognizer
   determines that its confidence in all its recognition results is less
   than the confidence threshold, then it MUST return no-match as the
   recognition result.  This header field MAY occur in RECOGNIZE, SET-
   PARAMS, or GET-PARAMS.  The default value for this field is platform
   specific.

     confidence-threshold =    "Confidence-Threshold" ":" 1*DIGIT CRLF

8.4.2.  Sensitivity Level

   To filter out background noise and not mistake it for speech, the
   recognizer may support a variable level of sound sensitivity.  The
   sensitivity-level parameter allows the client to set this value on
   the recognizer.  This header field MAY occur in RECOGNIZE, SET-
   PARAMS, or GET-PARAMS.  A higher value for this field means higher
   sensitivity.  The default value for this field is platform specific.

     sensitivity-level   =    "Sensitivity-Level" ":" 1*DIGIT CRLF

8.4.3.  Speed Vs Accuracy

   Depending on the implementation and capability of the recognizer
   resource, it may be tunable towards Performance or Accuracy.  Higher
   accuracy may mean more processing and higher CPU utilization, meaning
   less calls per media server and vice versa.  This parameter on the
   resource can be tuned by the speed-vs-accuracy header.  This header
   field MAY occur in RECOGNIZE, SET-PARAMS, or GET-PARAMS.  A higher
   value for this field means higher speed.  The default value for this
   field is platform specific.

     speed-vs-accuracy   =     "Speed-Vs-Accuracy" ":" 1*DIGIT CRLF

8.4.4.  N Best List Length

   When the recognizer matches an incoming stream with the grammar, it
   may come up with more than one alternative match because of
   confidence levels in certain words or conversation paths.  If this
   header field is not specified, by default, the recognition resource
   will only return the best match above the confidence threshold.  The
   client, by setting this parameter, could ask the recognition resource
   to send it more than 1 alternative.  All alternatives must still be
   above the confidence-threshold.  A value greater than one does not
   guarantee that the recognizer will send the requested number of
   alternatives.  This header field MAY occur in RECOGNIZE, SET-PARAMS,
   or GET-PARAMS.  The minimum value for this field is 1.  The default
   value for this field is 1.

     n-best-list-length  =    "N-Best-List-Length" ":" 1*DIGIT CRLF

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,

   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.7.  Waveform URL

   If the save-waveform header field is set to true, the recognizer MUST
   record the incoming audio stream of the recognition into a file and
   provide a URI for the client to access it.  This header MUST be
   present in the RECOGNITION-COMPLETE event if the save-waveform header
   field was set to true.  The URL value of the header MUST be NULL if
   there was some error condition preventing the server from recording.
   Otherwise, the URL generated by the server SHOULD be globally unique
   across the server and all its recognition sessions.  The URL SHOULD
   BE available until the session is torn down.

     waveform-url        =    "Waveform-URL" ":" Url CRLF

8.4.8.  Completion Cause

   This header field MUST be part of a RECOGNITION-COMPLETE event coming
   from the recognizer resource to the client.  This indicates the
   reason behind the RECOGNIZE method completion.  This header field
   MUST BE sent in the DEFINE-GRAMMAR and RECOGNIZE responses, if they
   return with a failure status and a COMPLETE state.

     Cause-Code     Cause-Name     Description

       000           success       RECOGNIZE completed with a match or
                                   DEFINE-GRAMMAR succeeded in
                                   downloading and compiling the
                                   grammar

       001           no-match      RECOGNIZE completed, but no match
                                   was found
       002          no-input-timeout
                                   RECOGNIZE completed without a match
                                   due to a no-input-timeout
       003          recognition-timeout
                                   RECOGNIZE completed without a match
                                   due to a recognition-timeout
       004           gram-load-failure
                                   RECOGNIZE failed due grammar load
                                   failure.
       005           gram-comp-failure
                                   RECOGNIZE failed due to grammar
                                   compilation failure.
       006           error         RECOGNIZE request terminated
                                   prematurely due to a recognizer
                                   error.
       007           speech-too-early
                                   RECOGNIZE request terminated because
                                   speech was too early.
       008           too-much-speech-timeout
                                   RECOGNIZE request terminated because
                                   speech was too long.
       009           uri-failure   Failure accessing a URI.
       010           language-unsupported
                                   Language not supported.

8.4.9.  Recognizer Context Block

   This parameter MAY BE sent as part of the SET-PARAMS or GET-PARAMS
   request.  If the GET-PARAMS method contains this header field with no
   value, then it is a request to the recognizer to return the
   recognizer context block.  The response to such a message MAY contain
   a recognizer context block as a message entity.  If the server
   returns a recognizer context block, the response MUST contain this
   header field and its value MUST match the content-id of that entity.

   If the SET-PARAMS method contains this header field, it MUST contain
   a message entity containing the recognizer context data, and a
   content-id matching this header field.

   This content-id should match the content-id that came with the
   context data during the GET-PARAMS operation.

     recognizer-context-block =    "Recognizer-Context-Block" ":"
                                   1*ALPHA 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.11.  Vendor Specific Parameters

   This set of headers allows the client to set Vendor Specific
   parameters.

   This header can be sent in the SET-PARAMS method and is used to set
   vendor-specific parameters on the server.  The vendor-av-pair-name
   can be any vendor-specific field name and conforms to the XML
   vendor-specific attribute naming convention.  The vendor-av-pair-
   value is the value to set the attribute to, and needs to be quoted.

   When asking the server to get the current value of these parameters,
   this header can be sent in the GET-PARAMS method with the list of
   vendor-specific attribute names to get separated by a semicolon.
   This header field MAY occur in SET-PARAMS or GET-PARAMS.

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

   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.

8.4.14.  DTMF Interdigit Timeout

   This header field specifies the inter-digit timeout value to use when
   recognizing DTMF input.  The value is in milliseconds.  The value for
   this field ranges from 0 to MAXTIMEOUT, where MAXTIMEOUT is platform
   specific.  The default value is 5 seconds.  This header field MAY
   occur in RECOGNIZE, SET-PARAMS, or GET-PARAMS.

     dtmf-interdigit-timeout = "DTMF-Interdigit-Timeout" ":"
                               1*DIGIT CRLF

8.4.15.  DTMF Term Timeout

   This header field specifies the terminating timeout to use when
   recognizing DTMF input.  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.

     dtmf-term-timeout   =    "DTMF-Term-Timeout" ":" 1*DIGIT CRLF

8.4.16.  DTMF-Term-Char

   This header field specifies the terminating DTMF character for DTMF
   input recognition.  The default value is NULL which is specified as
   an empty header field.  This header field MAY occur in RECOGNIZE,
   SET-PARAMS, or GET-PARAMS.

     dtmf-term-char      =    "DTMF-Term-Char" ":" CHAR CRLF

8.4.17.  Fetch Timeout

   When the recognizer needs to fetch grammar documents, this header
   field controls URI access properties.  This defines the recognizer
   timeout for completing the fetch of the resources the media server
   needs from the network.  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.
   This header field MAY occur in RECOGNIZE, SET-PARAMS, or GET-PARAMS.

8.4.18.  Failed URI

   When a recognizer method needs a recognizer to fetch or access a URI,
   and the access fails, the media server SHOULD provide the failed URI
   in this header field in the method response.

8.4.19.  Failed URI Cause

   When a recognizer method needs a recognizer to fetch or access a URI,
   and the access fails, the media server SHOULD provide the URI-
   specific or protocol-specific response code through this header field
   in the method response.  This field has been defined as alphanumeric
   to accommodate all protocols, some of which might have a response
   string instead of a numeric response code.

8.4.20.  Save Waveform

   This header field allows the client to indicate to the recognizer
   that it MUST save the audio stream that was recognized.  The
   recognizer MUST then record the recognized audio and make it
   available to the client in the form of a URI returned in the
   waveform-uri header field in the RECOGNITION-COMPLETE event.  If
   there was an error in recording the stream or the audio clip is
   otherwise not available, the recognizer MUST return an empty
   waveform-uri header field.  The default value for this fields is
   "false".

     save-waveform       =    "Save-Waveform" ":" boolean-value CRLF

8.4.21.  New Audio Channel

   This header field MAY BE specified in a RECOGNIZE message and allows
   the client to tell the media server that, from that point on, it will
   be sending audio data from a new audio source, channel, or speaker.
   If the recognition resource had collected any line statistics or
   information, it MUST discard it and start fresh for this RECOGNIZE.
   This helps in the case where the client MAY want to reuse an open
   recognition session with the media server for multiple telephone
   calls.

     new-audio-channel   =    "New-Audio-Channel" ":" boolean-value CRLF

8.4.22.  Speech Language

   This header field specifies the language of recognition grammar data
   within a session or request, if it is not specified within the data.
   The value of this header field should follow RFC 3066 [16] for its
   values.  This MAY occur in DEFINE-GRAMMAR, RECOGNIZE, SET-PARAMS, or
   GET-PARAMS request.

8.5.  Recognizer Message Body

   A recognizer message may carry additional data associated with the
   method, response, or event.  The client may send the grammar to be
   recognized in DEFINE-GRAMMAR or RECOGNIZE requests.  When the grammar
   is sent in the DEFINE-GRAMMAR method, the server should be able to
   download compile and optimize the grammar.  The RECOGNIZE request
   MUST contain a list of grammars that need to be active during the
   recognition.  The server resource may send the recognition results in
   the RECOGNITION-COMPLETE event or the GET-RESULT response.  This data
   will be carried in the message body of the corresponding MRCP
   message.

8.5.1.  Recognizer Grammar Data

   Recognizer grammar data from the client to the server can be provided
   inline or by reference.  Either way, they are carried as MIME
   entities in the message body of the MRCP request message.  The
   grammar specified inline or by reference specifies the grammar used
   to match in the recognition process and this data is specified in one
   of the standard grammar specification formats like W3C’s XML or ABNF
   or Sun’s Java Speech Grammar Format, etc.  All media servers MUST
   support W3C’s XML based grammar markup format [11] (MIME-type
   application/grammar+xml) and SHOULD support the ABNF form (MIME-type
   application/grammar).

   When a grammar is specified in-line in the message, the client MUST
   provide a content-id for that grammar as part of the content headers.
   The server MUST store the grammar associated with that content-id for
   the duration of the session.  A stored grammar can be overwritten by
   defining a new grammar with the same content-id.  Grammars that have
   been associated with a content-id can be referenced through a special
   "session:" URI scheme.

   Example:
     session:help@root-level.store

   If grammar data needs to be specified by external URI reference, the
   MIME-type text/uri-list is used to list the one or more URI that will
   specify the grammar data.  All media servers MUST support the HTTP
   URI access mechanism.

   If the data to be defined consists of a mix of URI and inline grammar
   data, the multipart/mixed MIME-type is used and embedded with the
   MIME-blocks for text/uri-list, application/grammar or
   application/grammar+xml.  The character set and encoding used in the
   grammar data may be specified according to standard MIME-type
   definitions.

   When more than one grammar URI or inline grammar block is specified
   in a message body of the RECOGNIZE request, it is an active list of
   grammar alternatives to listen.  The ordering of the list implies the
   precedence of the grammars, with the first grammar in the list having
   the highest precedence.

   Example 1:
       Content-Type:application/grammar+xml
       Content-Id:request1@form-level.store
       Content-Length:104

       <?xml version="1.0"?>

       <!-- the default grammar language is US English -->
       <grammar xml:lang="en-US" version="1.0">

       <!-- single language attachment to tokens -->
       <rule id="yes">
                  <one-of>
                      <item xml:lang="fr-CA">oui</item>
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容