Synthesizer STOP
The STOP method, sent from the client to the server, tells the synthesizer resource to stop speaking if speech is in progress.
STOP can carry an Active-Request-Id-List header field to terminate one or more specific SPEAK requests that are queued, returning a 200 (Success) response. If no Active-Request-Id-List is supplied, STOP terminates all outstanding SPEAK requests.
When STOP terminates one or more PENDING or IN-PROGRESS SPEAK requests, the response includes an Active-Request-Id-List header listing the terminated request-ids; otherwise that header is absent. No SPEAK-COMPLETE events are sent for the terminated requests.
If the SPEAK request that was IN-PROGRESS (actively speaking) is stopped, the next pending SPEAK request, if any, becomes IN-PROGRESS and moves into the speaking state.
MRCPv1 example
A SPEAK request is in progress when the client issues STOP; the COMPLETE response confirms the terminated request through the Active-Request-Id-List header:
| C->S: SPEAK 543258 MRCP/1.0 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: STOP 543259 MRCP/1.0 S->C: MRCP/1.0 543259 200 COMPLETE Active-Request-Id-List:543258 |
MRCPv2 example
The same exchange in MRCPv2, with the Channel-Identifier and Speech-Marker headers on each message:
| C->S: MRCP/2.0 ... SPEAK 543258 Channel-Identifier:32AECB23433802@speechsynth 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 ... STOP 543259 Channel-Identifier:32AECB23433802@speechsynth S->C: MRCP/2.0 ... 543259 200 COMPLETE Channel-Identifier:32AECB23433802@speechsynth Active-Request-Id-List:543258 Speech-Marker:timestamp=857206039059 |
