Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

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

(warning)

Warning

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(link takes you to an external page).


Transcription Properties

transcription-properties page anchor
Resource properties
account_sidtype: SID<AC>Not PII

The SID of the Account(link takes you to an external page) that created the Transcription resource.


api_versiontype: stringNot PII

The API version used to create the transcription.


date_createdtype: string<DATE TIME RFC 2822>Not PII

The date and time in GMT that the resource was created specified in RFC 2822(link takes you to an external page) format.


date_updatedtype: string<DATE TIME RFC 2822>Not PII

The date and time in GMT that the resource was last updated specified in RFC 2822(link takes you to an external page) format.


durationtype: stringNot PII

The duration of the transcribed audio in seconds.


pricetype: numberNot PII

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_unittype: string<CURRENCY>Not PII

The currency in which price is measured, in ISO 4127(link takes you to an external page) format (e.g. usd, eur, jpy).


recording_sidtype: SID<RE>Not PII

The SID of the Recording(link takes you to an external page) from which the transcription was created.


sidtype: SID<TR>Not PII

The unique string that that we created to identify the Transcription resource.


statustype: enum<STRING>Not PII

The status of the transcription. Can be: in-progress, completed, failed.

Possible values:
in-progresscompletedfailed

transcription_texttype: stringPII MTL: 30 days

The text content of the transcription.


typetype: stringNot PII

The transcription type. Can only be: fast.


uritype: stringNot PII

The URI of the resource, relative to https://api.twilio.com.


Fetch a Transcription resource

fetch-a-transcription-resource page anchor
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

Parameters

fetch-parameters page anchor
URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The SID of the Account(link takes you to an external page) that created the Transcription resource to fetch.


Sidtype: SID<TR>Not PII
Path Parameter

The Twilio-provided string that uniquely identifies the Transcription resource to fetch.

Fetch a specific Transcription

fetch-a-specific-transcription page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.transcriptions('TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(transcription => console.log(transcription.dateCreated));

Output

_15
{
_15
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15
"api_version": "2008-08-01",
_15
"date_created": "Sun, 13 Feb 2011 02:12:08 +0000",
_15
"date_updated": "Sun, 13 Feb 2011 02:30:01 +0000",
_15
"duration": "1",
_15
"price": -0.05000,
_15
"price_unit": "USD",
_15
"recording_sid": "REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15
"sid": "TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15
"status": "failed",
_15
"transcription_text": "(blank)",
_15
"type": "fast",
_15
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json"
_15
}


Read multiple Transcription resources

read-multiple-transcription-resources page anchor
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.

URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The SID of the Account(link takes you to an external page) that created the Transcription resources to read.


PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Read: List all Transcriptions

read-list-all-transcriptions page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.transcriptions.list({limit: 20})
_10
.then(transcriptions => transcriptions.forEach(t => console.log(t.sid)));

Output

_30
{
_30
"end": 0,
_30
"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?PageSize=1&Page=0",
_30
"last_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?PageSize=1&Page=3",
_30
"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?PageSize=1&Page=1",
_30
"num_pages": 4,
_30
"page": 0,
_30
"page_size": 1,
_30
"previous_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?PageSize=1&Page=0",
_30
"start": 0,
_30
"total": 4,
_30
"transcriptions": [
_30
{
_30
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"api_version": "2008-08-01",
_30
"date_created": "Thu, 25 Aug 2011 20:59:45 +0000",
_30
"date_updated": "Thu, 25 Aug 2011 20:59:45 +0000",
_30
"duration": "10",
_30
"price": "0.00000",
_30
"price_unit": "USD",
_30
"recording_sid": "REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"sid": "TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30
"status": "completed",
_30
"transcription_text": null,
_30
"type": "fast",
_30
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json"
_30
}
_30
],
_30
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?PageSize=1&Page=0"
_30
}

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:


_10
curl -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 a Transcription resource

delete-a-transcription-resource page anchor
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.

URI parameters
AccountSidtype: SID<AC>Not PII
Path Parameter

The SID of the Account(link takes you to an external page) that created the Transcription resources to delete.


Sidtype: SID<TR>Not PII
Path Parameter

The Twilio-provided string that uniquely identifies the Transcription resource to delete.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.transcriptions('TRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();


Rate this page: