Synthesizer BARGE-IN-OCCURRED

The BARGE-IN-OCCURRED method is a mechanism for the client to communicate a barge-in-able event it detects to the speech resource.

This event is useful in two scenarios,

  1. The client has detected some events like DTMF digits or other barge-in-able events and wants to communicate that to the synthesizer.
  2. The recognizer resource and the synthesizer resource are in different servers.  In which case the client MUST act as a Proxy and receive event from the recognition resource, and then send a BARGE-IN-OCCURRED method to the synthesizer.  In such cases, the BARGE-IN-OCCURRED method would also have a proxy-sync-id header field received from the resource generating the original event.

If a SPEAK request is active with kill-on-barge-in enabled, and the BARGE-IN-OCCURRED event is received, the synthesizer should stop streaming out audio.  It should also terminate any speech requests queued behind the current active one, irrespective of whether they have barge-in enabled or not.  If a barge-in-able prompt was playing and it was terminated, the response will contain the request-ids of all SPEAK requests that were terminated in its active-request-id-list.  There will be no SPEAK-COMPLETE events generated for these requests.

If the synthesizer and the recognizer are on the same server, they could be optimized for a quicker kill-on-barge-in response by having them interact directly based on a common RTSP session-id.  In these cases, the client will still proxy the recognition event through a BARGE-IN-OCCURRED method, but the synthesizer resource may have already stopped and sent a SPEAK-COMPLETE event with a barge-in completion cause code.  If there were no SPEAK requests terminated as a result of the BARGE-IN-OCCURRED method, the response would still be a 200 success, but will not contain an active-request-id-list header field..



MRCPV1 BARGE-IN-OCCURRED Example:

  C->S:  SPEAK 543258 MRCP/1.0
                Voice-gender:female
                Prosody-volume:medium
               Content-Type:application/synthesis+ssml
               Content-Length:104

               <?xml version="1.0"?>
              <speak>
             <paragraph>
                      <sentence>You have 4 new messages.</sentence>
                     <sentence>The first is from <say-as
                      type="name">Stephanie Williams</say-as>
                      and arrived at <break/>
                     <say-as type="time">3:45pm</say-as>.</sentence>
                     <sentence>The subject is <prosody
                     rate="0.8">ski trip</prosody></sentence>
            </paragraph>
            </speak>

S->C: MRCP/1.0 543258 200 IN-PROGRESS

C->S: BARGE-IN-OCCURRED 543259 200 MRCP/1.0
             Proxy-Sync-Id:987654321

S->C: MRCP/1.0 543259 200 COMPLETE
              Active-Request-Id-List:543258                                                               

MRCPV2 BARGE-IN-OCCURRED Example:

   C->S: MRCP/2.0 ... SPEAK 543258
                 Channel-Identifier:32AECB23433802@speechsynth
                 Voice-gender:female
                 Prosody-volume:medium
                Content-Type:application/ssml+xml
                Content-Length:...

            <?xml version="1.0"?>
                 <speak version="1.0"
                         xmlns="http://www.w3.org/2001/10/synthesis"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
                             http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
                     xml:lang="en-US">
             <p>
                <s>You have 4 new messages.</s>
               <s>The first is from Stephanie Williams and arrived at
                    <break/>
                   <say-as interpret-as="vxml:time">0342p</say-as>.</s>
              <s>The subject is
                    <prosody rate="0.8">ski trip</prosody></s>
                </p>
           </speak>

   S->C: MRCP/2.0 ... 543258 200 IN-PROGRESS
               Channel-Identifier:32AECB23433802@speechsynth
              Speech-Marker:timestamp=857206027059

   C->S: MRCP/2.0 ... BARGE-IN-OCCURRED 543259
               Channel-Identifier:32AECB23433802@speechsynth
               Proxy-Sync-Id:987654321

   S->C: MRCP/2.0 ... 543259 200 COMPLETE
              Channel-Identifier:32AECB23433802@speechsynth
              Active-Request-Id-List:543258
             Speech-Marker:timestamp=857206039059       



Was this article helpful?
Copyright (C) 2001-2024, Ai Software, LLC d/b/a LumenVox