Recording Transcription
A Transcription represents the transcribed text and metadata from a transcribed recording of a voice call.
The transcription text itself is the result of converting an audio recording to readable text. To generate transcriptions from call recordings, use the TwiML <Record>
verb and set transcribe="true"
. Note that
Your account will be charged if you request transcription for a recording, as this is a paid feature. Additionally, transcription is currently limited to recordings initiated with the TwiML <Record> verb and are at most two minutes in length.
For pricing information, see the transcriptions pricing page.
Transcription properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the Transcription resource. |
api_version
|
The API version used to create the transcription. |
date_created
|
The date and time in GMT that the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT that the resource was last updated specified in RFC 2822 format. |
duration
|
The duration of the transcribed audio in seconds. |
price
|
The charge for the transcript in the currency associated with the account. This value is populated after the transcript is complete so it may not be available immediately. |
price_unit
|
The currency in which |
recording_sid
|
The SID of the Recording from which the transcription was created. |
sid
|
The unique string that that we created to identify the Transcription resource. |
status
|
The status of the transcription. Can be: |
transcription_text
|
The text content of the transcription. |
type
|
The transcription type. Can only be: |
uri
|
The URI of the resource, relative to |
Fetch a Transcription resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json
Twilio will respond with the JSON metadata for the Transcription. If you append ".txt
" to the end of the Transcription resource's URI, Twilio will return only the text of the transcription:
/2010-04-01/Accounts/{AccountSid}/Transcriptions/{TranscriptionSid}.txt
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Transcription resource to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Transcription resource to fetch. |
Example 1
Read multiple Transcription resources
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Transcriptions.json
Returns the full set of Transcriptions generated from all recordings in an account.
The list Twilio returns includes paging information.
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Transcription resources to read. |
Example 1
You can also access a full list of Transcriptions directly from a given Recording by passing the RecordingSid
to the Recording resource:
/2010-04-01/Accounts/{YourAccountSid}/Recordings/{RecordingSid}/Transcriptions.json
The cURL command to fetch Transcriptions from a Recording looks like this:
curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json \
-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
If you prefer that Twilio responds with XML, change .json
to .xml
.
Delete a Transcription resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Transcriptions/{Sid}.json
Delete a transcription from your account.
If the request is successful, Twilio will return HTTP 204 (No Content) with no body.
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the Transcription resources to delete. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Transcription resource to delete. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.