Public Beta
Voice Intelligence is currently available as a public beta release. Some features are not yet implemented and others may be changed before the product is declared as Generally Available. Beta products are not covered by a Twilio SLA.
Learn more about beta product support.
A Transcript
resource represents a voice conversation that has automatically been converted to text through Voice Intelligence. The Transcript
resource is a container and includes links to individual transcribed Sentence
, Media
, and OperatorResults
resources.
account_sid
type: SID<AC>The unique SID identifier of the Account.
^AC[0-9a-fA-F]{32}$
34
34
service_sid
type: SID<GA>The unique SID identifier of the Service.
^GA[0-9a-fA-F]{32}$
34
34
sid
type: SID<GT>A 34 character string that uniquely identifies this Transcript.
^GT[0-9a-fA-F]{32}$
34
34
date_created
type: string<date-time>The date that this Transcript was created, given in ISO 8601 format.
date_updated
type: string<date-time>The date that this Transcript was updated, given in ISO 8601 format.
status
type: enum<string>The Status of this Transcript. One of queued
, in-progress
, completed
, failed
or canceled
.
queued
in-progress
completed
failed
canceled
data_logging
type: booleanData logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
media_start_time
type: string<date-time>The date that this Transcript's media was started, given in ISO 8601 format.
redaction
type: booleanIf the transcript has been redacted, a redacted alternative of the transcript will be available.
links
type: object<uri-map>POST https://intelligence.twilio.com/v2/Transcripts
You can only create one Transcript per RecordingSid
. To re-transcribe a recording, you will need to delete the original Transcript resource and create a new one.
This limitation does not apply if you are supplying a MediaUrl
to create a Transcript.
Transcripts can be created in one of two ways:
POST
request to the
Transcript
API and include the recording's SID as a
RecordingSID
parameter. Voice Intelligence will retrieve the recording from Twilio's storage and transcribe it.
POST
request to the
Transcript
API and including the
MediaUrl
parameter with the recording's location as its value. The URL must be accessible, either publicly or through a mechanism like a pre-signed URL.
Transcripts cannot be created for recordings made by projects with Voice Recording Encryption enabled, as Voice Intelligence is unable to decrypt those resources. We recommend offloading those recordings to your own storage and generating a pre-signed URL to supply them to the Transcript
API.
Twilio's Transcript
resource using the MediaUrl
parameter supports the following audio formats:
All these formats support both mono
and stereo
audio channels.
Transcript
resource.
ServiceSid
type: SID<GA>RequiredThe unique SID identifier of the Service.
^GA[0-9a-fA-F]{32}$
34
34
Channel
type: objectRequiredJSON object describing Media Channel including Source and Participants
CustomerKey
type: stringUsed to store client provided metadata. Maximum of 64 double-byte UTF8 characters.
MediaStartTime
type: string<date-time>The date that this Transcript's media was started, given in ISO 8601 format.
Channel
is the object representing the media channel. It has information about the source of the media, either a Twilio recording or a 3rd party recording, and the participants information.
_34{_34 "$schema": "https://json-schema.org/draft/2019-09/schema",_34 "type": "object",_34 "items": {_34 "$ref": "#/definitions/Channel"_34 },_34 "definitions": {_34 "Channel": {_34 "type": "object",_34 "additionalProperties": false,_34 "properties": {_34 "media_properties": {_34 "type": "object",_34 "properties": {_34 "source_sid": {_34 "type": "string",_34 "$comment": "Twilio Recording Sid"_34 },_34 "media_url": {_34 "type": "string",_34 "format": "uri",_34 "$comment": "url to the 3rd party recording"_34 }_34 },_34 "$comment": "Either source_sid or media_url is required"_34 },_34 "participants": {_34 "type": "array"_34 }_34 },_34 "title": "Channel"_34 }_34 }_34}
If the Transcript
was generated from an external recording, the Channel
information would look like the following:
_10{_10 "media_properties":{_10 "source_sid": null,_10 "media_url": "http://www.example.com/recording/call.wav"_10 },_10 "participants":[_10_10 ]_10 }
By default, Voice Intelligence assumes that the left channel (channel One) is the agent and the right channel (channel Two) is the customer. The order of these channels may be inverted, depending on how your call flow works and which call leg is being recorded.
You can specify information about channel structure, as well as information about who each participant is, by passing in a URL-encoded JSON array containing information about each participant into the Participants
parameter in the Channel
object. The Participants
array follows this JSON schema:
_48{_48 "$schema": "http://json-schema.org/draft-06/schema#",_48 "type": "array",_48 "maxItems": 2,_48 "items": {_48 "$ref": "#/definitions/Participant"_48 },_48 "definitions": {_48 "Participant": {_48 "type": "object",_48 "additionalProperties": false,_48 "properties": {_48 "channel_participant": {_48 "type": "integer",_48 "enum": [_48 1,_48 2_48 ],_48 "$comment": "You can only specify one participant per channel"_48 },_48 "user_id": {_48 "type": "string"_48 },_48 "media_participant_id": {_48 "type": "string"_48 },_48 "role": {_48 "type": "string"_48 },_48 "full_name": {_48 "type": "string"_48 },_48 "email": {_48 "type": "string",_48 "format": "email"_48 },_48 "image_url": {_48 "type": "string",_48 "format": "uri"_48 }_48 },_48 "required": [_48 "channel_participant"_48 ],_48 "title": "Participant"_48 }_48 }_48}
_20[_20 {_20 "user_id" : "id1",_20 "channel_participant": 1,_20 "media_participant_id": "+1505959545",_20 "email": "veronica.meyer@example.com",_20 "full_name": "Veronica Meyer",_20 "image_url": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80",_20 "role": "Agent"_20 },_20 {_20 "user_id" : "id2",_20 "channel_participant": 2,_20 "media_participant_id": "+1505959505",_20 "email": "lauryn.trujillo@example.com",_20 "full_name": "Lauryn Trujillo",_20 "image_url": "https://images.unsplash.com/photo-1554384645-13eab165c24b",_20 "role": "Customer"_20 }_20]
GET https://intelligence.twilio.com/v2/Transcripts/{Sid}
Sid
type: SID<GT>A 34 character string that uniquely identifies this Transcript.
^GT[0-9a-fA-F]{32}$
34
34
GET https://intelligence.twilio.com/v2/Transcripts
ServiceSid
type: SID<GA>The unique SID identifier of the Service.
^GA[0-9a-fA-F]{32}$
34
34
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
DELETE https://intelligence.twilio.com/v2/Transcripts/{Sid}
Sid
type: SID<GT>A 34 character string that uniquely identifies this Transcript.
^GT[0-9a-fA-F]{32}$
34
34