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

Transcript Sentence Resource


A Transcript Sentence is the actual text of the recording transcription.

The GET Sentences request returns a list of Sentences of a Transcript. With the Redacted query param, the endpoint returns the PII redacted/unredacted Sentences.


Sentence Properties

sentence-properties page anchor
Property nameTypePIIDescription
media_channelinteger
Not PII

The channel number.


sentence_indexinteger

The index of the sentence in the transcript.


start_timenumber

Offset from the beginning of the transcript when this sentence starts.


end_timenumber

Offset from the beginning of the transcript when this sentence ends.


transcriptstring
PII MTL: 30 days

Transcript text.


sidSID<GX>

A 34 character string that uniquely identifies this Sentence.

Pattern: ^GX[0-9a-fA-F]{32}$Min length: 34Max length: 34

confidencenumber

Get Transcript Sentences

get-transcript-sentences page anchor
GET https://intelligence.twilio.com/v2/Transcripts/{TranscriptSid}/Sentences

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
TranscriptSidSID<GT>required

The unique SID identifier of the Transcript.

Pattern: ^GT[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
RedactedbooleanOptional

Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is true to access redacted sentences.


PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple Sentences

list-multiple-sentences page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listSentence() {
_18
const sentences = await client.intelligence.v2
_18
.transcripts("GTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18
.sentences.list({ limit: 20 });
_18
_18
sentences.forEach((s) => console.log(s.mediaChannel));
_18
}
_18
_18
listSentence();

Output

_22
{
_22
"sentences": [
_22
{
_22
"media_channel": 1,
_22
"sentence_index": 0,
_22
"start_time": null,
_22
"end_time": null,
_22
"transcript": "test test",
_22
"sid": "GXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"confidence": null
_22
}
_22
],
_22
"meta": {
_22
"key": "sentences",
_22
"page": 0,
_22
"page_size": 50,
_22
"first_page_url": "https://intelligence.twilio.com/v2/Transcripts/GTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sentences?PageSize=50&Page=0",
_22
"url": "https://intelligence.twilio.com/v2/Transcripts/GTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sentences?PageSize=50&Page=0",
_22
"next_page_url": null,
_22
"previous_page_url": null
_22
}
_22
}


Rate this page: