Use AutoTranscribe with Twilio
HTTPS
protocol. Traffic using HTTP
will not be redirected to HTTPS
.GET /mg-autotranscribe/v1/twilio-media-stream-url
HTTP headers (required):
statusCallback
URL. Twilio will use this URL in the event connectivity is lost or has an error. It will be up to the customer call center to process this callback and instruct Twilio to again start new Media Streams, assuming transcriptions are still desired.
statusCallback
parameter (along with statusCallbackMethod
if needed) of the Twilio API. Should a failure occur, the URL specified in statusCallback
parameter will receive the HTTP request informing of a failure.
If a failure notification is received, it means ASAPP has stopped receiving audio from Twilio and no more transcriptions for that call will take place. To restart transcriptions:
/start-streaming
and /stop-streaming
endpoints of the Start/Stop API are used to control when transcription occurs for every call.
See the API Reference to learn how to interact with this API.
ASAPP will not begin transcribing call audio until requested to, thus preventing transcription of audio at the very beginning of the audio streaming session, which may include IVR, hold music, or queueing.
Stop requests are used to pause or end transcription for any needed reason. For example, a stop request could be used mid-call when the agent places the call on hold or at the end of the call to prevent transcribing post-call interactions such as satisfaction surveys.
/start-streaming
endpoint, AutoTranscribe begins to publish transcript
messages, each of which contains a full utterance for a single call participant.
The expected latency between when ASAPP receives audio for a completed utterance and provides a transcription of that same utterance is 200-600ms.
transcript
type messages is JSON encoded with these fields:
Field | Subfield | Description | Example Value |
---|---|---|---|
externalConversationId | Unique identifier with the Amazon Connect Contact Id for the call | 8c259fea-8764-4a92-adc4-73572e9cf016 | |
streamId | Unique identifier assigned by ASAPP to each call participant’s stream returned in response to /start-streaming and /stop-streaming | 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 | |
sender | externalId | Customer or agent identifier as provided in request to /start-streaming | ef53245 |
sender | role | A participant role, either customer or agent | customer, agent |
autotranscribeResponse | message | Type of message | transcript |
autotranscribeResponse | start | The start ms of the utterance | 0 |
autotranscribeResponse | end | Elapsed ms since the start of the utterance | 1000 |
autotranscribeResponse | utterance | Transcribed utterance text | Are you there? |
transcript
message format:
GET /conversation/v1/conversation/messages
Once a conversation is complete, make a request to the endpoint using a conversation identifier and receive back every message in the conversation.
Message Limit
This endpoint will respond with up to 1,000 transcribed messages per conversation, approximately a two-hour continuous call. All messages are received in a single response without any pagination.
To retrieve all messages for calls that exceed this limit, use either a real-time mechanism or File Exporter for transcript retrieval.
utterances
data feed.
The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.
Visit Retrieving Data from ASAPP for a guide on how to interact with the File Exporter service.
/mg-autotranscribe/v1/twilio-media-stream-url
Response
STATUS 200: OK - Twilio media stream url in the response body
CA5b040e075515c424391012acc5a870cf
/mg-autotranscribe/v1/start-streaming
Request
transcript
messages are sent for each participant from ASAPP’s webhook publisher to a target endpoint configured to receive the messages.
HTTPS POST for Customer Utterance
/stop-streaming
endpoint to pause transcription and prevents hold music and promotional messages from being transcribed.
POST /mg-autotranscribe/v1/stop-streaming
Request