Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Transcription resource.

apiVersion
string Not PII

The API version used to create the transcription.

dateCreated
date_time<rfc2822> Not PII

The date and time in GMT that the resource was created specified in RFC 2822 format.

dateUpdated
date_time<rfc2822> Not PII

The date and time in GMT that the resource was last updated specified in RFC 2822 format.

duration
string Not PII

The duration of the transcribed audio in seconds.

price
decimal Not 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.

priceUnit
currency Not PII

The currency in which price is measured, in ISO 4127 format (e.g. usd, eur, jpy).

recordingSid
sid<RE> Not PII

The SID of the Recording from which the transcription was created.

sid
sid<TR> Not PII

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

status
enum:status Not PII

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

transcriptionText

The text content of the transcription.

type
string Not PII

The transcription type. Can only be: fast.

uri
uri Not PII

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

Fetch a Transcription resource

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:

/2010-04-01/Accounts/{AccountSid}/Transcriptions/{TranscriptionSid}.txt
Parameters
Names in None format
account_sid
Required
get sid<AC> Not PII

The SID of the Account that created the Transcription resource to fetch.

sid
Required
get sid<TR> Not PII

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

Example 1
        
        
        
        

        Read multiple Transcription resources

        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.

        Parameters
        Names in None format
        account_sid
        Required
        get sid<AC> Not PII

        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

              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.

              Parameters
              Names in None format
              account_sid
              Required
              delete sid<AC> Not PII

              The SID of the Account that created the Transcription resources to delete.

              sid
              Required
              delete sid<TR> Not PII

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

              Example 1
                    
                    
                    
                    
                    Rate this page:

                    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 browsing the Twilio tag on Stack Overflow.