REST API: Transcriptions

A Transcription instance resource represents a transcription of a recording. The transcription text itself is the result of converting an audio recording to readable text. You generate transcriptions from recordings via the TwiML <Record> verb. The Transcriptions list resource represents the set of all transcriptions generated from recordings in an account.

For convenience, a Transcriptions list resource is also available as a subresource of a Recording instance resource. This resource is scoped to an individual recording, so that you can navigate directly from a recording to its transcriptions.

Note: transcription is a pay feature. If you request that a recording be transcribed, your account will be charged. Additionally, transcription is currently limited to recordings at most two minutes in length. Requesting transcription on longer recordings will return with a failure message.

See the pricing page for our transcription prices.

Transcription Instance Resource

This resource represents an individual text transcription of a recorded call.

Resource URI

/2010-04-01/Accounts/{AccountSid}/Transcriptions/{TranscriptionSid}

By default Twilio will respond with the XML metadata for the Transcription. If you append ".txt" to the end of the Transcription resource's URI Twilio will just return you the transcription text:

/2010-04-01/Accounts/{AccountSid}/Transcriptions/{TranscriptionSid}.txt

Resource Properties

A Transcription resource is represented by the following properties:

Property Description
Sid A 34 character string that uniquely identifies this resource.
DateCreated The date that this resource was created, given in RFC 2822 format.
DateUpdated The date that this resource was last updated, given in RFC 2822 format.
AccountSid The unique id of the Account responsible for this transcription.
Status A string representing the status of the transcription: in-progress, completed or failed.
RecordingSid The unique id of the Recording this Transcription was made of.
Duration The duration of the transcribed audio, in seconds.
TranscriptionText The text content of the transcription.
Price The charge for this transcript in the currency associated with the account. Populated after the transcript is completed. Note, this value may not be immediately available.
PriceUnit The currency in which Price is measured, in ISO 4127 format (e.g. usd, eur, jpy).
Uri The URI for this resource, relative to https://api.twilio.com

HTTP GET

Returns a single Transcription resource representation identified by the given {TranscriptionSid}.

Example
Get a Transcription
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$transcription = $client->account
    ->transcriptions("TR8c61027b709ffb038236612dc5af8723")
    ->fetch();

echo $transcription->transcriptionText;
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var transcription = twilio.GetTranscription("TR8c61027b709ffb038236612dc5af8723");
    
    Console.WriteLine(transcription.TranscriptionText);
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Transcription;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Transcription transcription = client.getAccount().getTranscription("TR8c61027b709ffb038236612dc5af8723");
    System.out.println(transcription.getTranscriptionText());
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.transcriptions("TR8c61027b709ffb038236612dc5af8723").get(function(err, transcription) {
    console.log(transcription.transcriptionText);
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

transcription = client.transcriptions.get("TR8c61027b709ffb038236612dc5af8723")
print(transcription.transcription_text)
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

# Get an object from its sid. If you do not have a sid,
# check out the list resource examples on this page
@transcription = @client.account.transcriptions.get("TR8c61027b709ffb038236612dc5af8723")
puts @transcription.transcription_text
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Get an object from its sid. If you do not have a sid,
// check out the list resource examples on this page
$transcription = $client->account->transcriptions->get("TR8c61027b709ffb038236612dc5af8723");
echo $transcription->transcription_text;
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Show Output
  • JSON
  • XML
{
	"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	"api_version": "2008-08-01",
	"date_created": "Mon, 26 Jul 2010 00:09:58 +0000",
	"date_updated": "Mon, 26 Jul 2010 00:10:25 +0000",
	"duration": "6",
	"price": "-0.05000",
	"recording_sid": "REca11f06dc31b5515a2dfb1f5134361f2",
	"sid": "TR8c61027b709ffb038236612dc5af8723",
	"status": "completed",
	"transcription_text": "Tommy? Tommy is that you? I told you never to call me again.",
	"type": "fast",
	"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723.json"
}
<TwilioResponse>
  <Transcription>
    <Sid>TR8c61027b709ffb038236612dc5af8723</Sid>
    <AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
    <DateCreated>Mon, 26 Jul 2010 00:09:58 +0000</DateCreated>
    <DateUpdated>Mon, 26 Jul 2010 00:10:25 +0000</DateUpdated>
    <Status>completed</Status>
    <Type>fast</Type>
    <RecordingSid>REca11f06dc31b5515a2dfb1f5134361f2</RecordingSid>
    <Duration>6</Duration>
    <TranscriptionText>Tommy? Tommy is that you? I told you never to call me again.</TranscriptionText>
    <ApiVersion>2008-08-01</ApiVersion>
    <Price>-0.05000</Price>
    <Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723</Uri>
  </Transcription>
</TwilioResponse>

HTTP POST

Not Supported

HTTP PUT

Not Supported

HTTP DELETE

Deletes a transcription from your account.

If successful, returns HTTP 204 (No Content) with no body.

Examples
Delete a Transcription
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

$client->account
    ->transcriptions("TR8c61027b709ffb038236612dc5af8723")
    ->delete();
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    twilio.DeleteTranscription("TR8c61027b709ffb038236612dc5af8723");
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Transcription;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    // Get an object from its sid. If you do not have a sid,
    // check out the list resource examples on this page
    Transcription transcription = client.getAccount().getTranscription("TR8c61027b709ffb038236612dc5af8723");
    
    transcription.delete();
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.transcriptions("TR8c61027b709ffb038236612dc5af8723").delete(function(err, data) {
    if (err) {
        console.log(err.status);
        throw err.message;
    } else {
        console.log("Sid TR8c61027b709ffb038236612dc5af8723 deleted successfully.");
    }
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

client.transcriptions.delete("TR8c61027b709ffb038236612dc5af8723")
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token

@transcription = @client.account.transcriptions.get("TR8c61027b709ffb038236612dc5af8723")
@transcription.delete
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

$client->account->transcriptions->delete("TR8c61027b709ffb038236612dc5af8723");
$ curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723 \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'

Transcriptions List Resource

Resource URI

/2010-04-01/Accounts/{AccountSid}/Transcriptions
/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions

HTTP GET

Returns a set of Transcription resource representations that includes paging information.

Example

Just grab the whole list.

List all Transcriptions
  • C#
  • Java
  • Node.js
  • PHP
  • Python
  • Ruby
  • curl
  • 4.x
  • 5.x
  • json
  • xml
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of transcriptions and echo a property for each one
foreach ($client->account->transcriptions->read() as $transcription) {
    echo $transcription->transcriptionText;
}
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio;
class Example 
{
  static void Main(string[] args) 
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var transcriptions = twilio.ListTranscriptions(null, null);
    
    foreach (var transcription in transcriptions.Transcriptions)
    {
      Console.WriteLine(transcription.TranscriptionText);
    }
  }
}
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioRestClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.Transcription;
import com.twilio.sdk.resource.list.TranscriptionList;

public class Example { 

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);

    
    
    TranscriptionList transcriptions = client.getAccount().getTranscriptions();
    
    // Loop over transcriptions and print out a property for each one.
    for (Transcription transcription : transcriptions) {
      System.out.println(transcription.getTranscriptionText());
    }
    
  }
}
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = "your_auth_token";
var client = require('twilio')(accountSid, authToken);

client.transcriptions.list(function(err, data) {
    data.transcriptions.forEach(function(transcription) {
        console.log(transcription.TranscriptionText);
    });
});
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token  = "your_auth_token"
client = TwilioRestClient(account_sid, auth_token)

# A list of transcription objects with the properties described above
transcriptions = client.transcriptions.list()
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'rubygems'          # This line not needed for ruby > 1.8
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new account_sid, auth_token


# Loop over transcriptions and print out a property for each one
@client.account.transcriptions.list.each do |transcription|
    puts transcription.transcription_text
end
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; 
$token = "your_auth_token"; 
$client = new Services_Twilio($sid, $token);

// Loop over the list of transcriptions and echo a property for each one
foreach ($client->account->transcriptions as $transcription) {
    echo $transcription->transcription_text;
}
$ curl -G https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
Show Output
  • JSON
  • XML
{
	"page": 0,
	"page_size": 50,
	"previous_page_uri": null,
	"first_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?Page=0&PageSize=50",
	"next_page_uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json?Page=1&PageSize=50",
	"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions.json",
	"transcriptions": [
		{
			"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"api_version": "2010-04-01",
			"date_created": "Mon, 26 Jul 2010 00:09:58 +0000",
			"date_updated": "Mon, 26 Jul 2010 00:10:25 +0000",
			"duration": "6",
			"price": "-0.05000",
			"recording_sid": "REca11f06dc31b5515a2dfb1f5134361f2",
			"sid": "TR8c61027b709ffb038236612dc5af8723",
			"status": "completed",
			"transcription_text": "Tommy? Tommy is that you? I told you never to call me again.",
			"type": "fast",
			"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723.json"
		},
		...
	]
}
<TwilioResponse>
	<Transcriptions page="0" pagesize="50" uri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions" firstpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions?Page=0&amp;PageSize=50" previouspageuri="" nextpageuri="/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions?Page=1&amp;PageSize=50">
		<Transcription>
			<Sid>TR8c61027b709ffb038236612dc5af8723</Sid>
			<DateCreated>Mon, 26 Jul 2010 00:09:58 +0000</DateCreated>
			<DateUpdated>Mon, 26 Jul 2010 00:10:25 +0000</DateUpdated>
			<AccountSid>ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</AccountSid>
			<Status>completed</Status>
			<Type>fast</Type>
			<RecordingSid>REca11f06dc31b5515a2dfb1f5134361f2</RecordingSid>
			<Duration>6</Duration>
			<TranscriptionText>Tommy? Tommy is that you? I told you never to call me again.</TranscriptionText>
			<ApiVersion>2010-04-01</ApiVersion>
			<Price>-0.05000</Price>
			<Uri>/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Transcriptions/TR8c61027b709ffb038236612dc5af8723</Uri>
		</Transcription>
		...
	</Transcriptions>
</TwilioResponse>

HTTP POST

Not Supported

HTTP PUT

Not Supported

HTTP DELETE

Not Supported