Skip to contentSkip to navigationSkip to topbar
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 nameTypeRequiredDescriptionChild properties
media_channelinteger

Optional

Not PII

The channel number.

Default: 0

sentence_indexinteger

Optional

The index of the sentence in the transcript.

Default: 0

start_timenumber

Optional

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


end_timenumber

Optional

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


transcriptstring

Optional

PII MTL: 30 days

Transcript text.


sidSID<GX>

Optional

A 34 character string that uniquely identifies this Sentence.

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

confidencenumber

Optional


wordsarray

Optional

Detailed information for each of the words of the given Sentence.


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
Redactedboolean

Optional

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


WordTimestampsboolean

Optional

Returns word level timestamps information, if word_timestamps is enabled. The default is false.


PageSizeinteger

Optional

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

Minimum: 1Maximum: 1000

Pageinteger

Optional

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

Minimum: 0

PageTokenstring

Optional

The page token. This is provided by the API.

List multiple SentencesLink to code sample: List multiple Sentences
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listSentence() {
11
const sentences = await client.intelligence.v2
12
.transcripts("GTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.sentences.list({ limit: 20 });
14
15
sentences.forEach((s) => console.log(s.mediaChannel));
16
}
17
18
listSentence();

Output

1
{
2
"sentences": [
3
{
4
"media_channel": 1,
5
"sentence_index": 0,
6
"start_time": null,
7
"end_time": null,
8
"transcript": "test test",
9
"sid": "GXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
10
"confidence": null,
11
"words": [
12
{
13
"word": "test",
14
"start_time": null,
15
"end_time": null
16
},
17
{
18
"word": "test",
19
"start_time": null,
20
"end_time": null
21
}
22
]
23
}
24
],
25
"meta": {
26
"key": "sentences",
27
"page": 0,
28
"page_size": 50,
29
"first_page_url": "https://intelligence.twilio.com/v2/Transcripts/GTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sentences?PageSize=50&Page=0",
30
"url": "https://intelligence.twilio.com/v2/Transcripts/GTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sentences?PageSize=50&Page=0",
31
"next_page_url": null,
32
"previous_page_url": null
33
}
34
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.