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.
account_sid
type: SID<AC>The SID of the Account that created the Transcription resource.
^AC[0-9a-fA-F]{32}$
34
34
date_created
type: string<date-time-rfc-2822>The date and time in GMT that the resource was created specified in RFC 2822 format.
date_updated
type: string<date-time-rfc-2822>The date and time in GMT that the resource was last updated specified in RFC 2822 format.
price
type: numberThe 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
type: string<currency>The currency in which price
is measured, in ISO 4127 format (e.g. usd
, eur
, jpy
).
recording_sid
type: SID<RE>The SID of the Recording from which the transcription was created.
^RE[0-9a-fA-F]{32}$
34
34
sid
type: SID<TR>The unique string that that we created to identify the Transcription resource.
^TR[0-9a-fA-F]{32}$
34
34
status
type: enum<string>The status of the transcription. Can be: in-progress
, completed
, failed
.
in-progress
completed
failed
GET 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:
_10/2010-04-01/Accounts/{AccountSid}/Transcriptions/{TranscriptionSid}.txt
AccountSid
type: SID<AC>The SID of the Account that created the Transcription resource to fetch.
^AC[0-9a-fA-F]{32}$
34
34
Sid
type: SID<TR>The Twilio-provided string that uniquely identifies the Transcription resource to fetch.
^TR[0-9a-fA-F]{32}$
34
34
GET 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.
AccountSid
type: SID<AC>The SID of the Account that created the Transcription resources to read.
^AC[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
You can also access a full list of Transcriptions directly from a given Recording by passing the RecordingSid
to the Recording resource:
_10/2010-04-01/Accounts/{YourAccountSid}/Recordings/{RecordingSid}/Transcriptions.json
The cURL command to fetch Transcriptions from a Recording looks like this:
_10curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json \_10-u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
If you prefer that Twilio responds with XML, change .json
to .xml
.
DELETE 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.
AccountSid
type: SID<AC>The SID of the Account that created the Transcription resources to delete.
^AC[0-9a-fA-F]{32}$
34
34
Sid
type: SID<TR>The Twilio-provided string that uniquely identifies the Transcription resource to delete.
^TR[0-9a-fA-F]{32}$
34
34