Google Cloud Contact Center Insights V1 Client - Class TranscriptSegment (1.8.0)

Reference documentation and code samples for the Google Cloud Contact Center Insights V1 Client class TranscriptSegment.

A segment of a full transcript.

Generated from protobuf message google.cloud.contactcenterinsights.v1.Conversation.Transcript.TranscriptSegment

Namespace

Google \ Cloud \ ContactCenterInsights \ V1 \ Conversation \ Transcript

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ message_time Google\Protobuf\Timestamp

The time that the message occurred, if provided.

↳ text string

The text of this segment.

↳ confidence float

A confidence estimate between 0.0 and 1.0 of the fidelity of this segment. A default value of 0.0 indicates that the value is unset.

↳ words array<Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>

A list of the word-specific information for each word in the segment.

↳ language_code string

The language code of this segment as a BCP-47 language tag. Example: "en-US".

↳ channel_tag int

For conversations derived from multi-channel audio, this is the channel number corresponding to the audio from that channel. For audioChannelCount = N, its output values can range from '1' to 'N'. A channel tag of 0 indicates that the audio is mono.

↳ segment_participant Google\Cloud\ContactCenterInsights\V1\ConversationParticipant

The participant of this segment.

↳ dialogflow_segment_metadata Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata

CCAI metadata relating to the current transcript segment.

↳ sentiment Google\Cloud\ContactCenterInsights\V1\SentimentData

The sentiment for this transcript segment.

getMessageTime

The time that the message occurred, if provided.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasMessageTime

clearMessageTime

setMessageTime

The time that the message occurred, if provided.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getText

The text of this segment.

Returns
TypeDescription
string

setText

The text of this segment.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfidence

A confidence estimate between 0.0 and 1.0 of the fidelity of this segment. A default value of 0.0 indicates that the value is unset.

Returns
TypeDescription
float

setConfidence

A confidence estimate between 0.0 and 1.0 of the fidelity of this segment. A default value of 0.0 indicates that the value is unset.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getWords

A list of the word-specific information for each word in the segment.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setWords

A list of the word-specific information for each word in the segment.

Parameter
NameDescription
var array<Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>
Returns
TypeDescription
$this

getLanguageCode

The language code of this segment as a BCP-47 language tag.

Example: "en-US".

Returns
TypeDescription
string

setLanguageCode

The language code of this segment as a BCP-47 language tag.

Example: "en-US".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getChannelTag

For conversations derived from multi-channel audio, this is the channel number corresponding to the audio from that channel. For audioChannelCount = N, its output values can range from '1' to 'N'. A channel tag of 0 indicates that the audio is mono.

Returns
TypeDescription
int

setChannelTag

For conversations derived from multi-channel audio, this is the channel number corresponding to the audio from that channel. For audioChannelCount = N, its output values can range from '1' to 'N'. A channel tag of 0 indicates that the audio is mono.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSegmentParticipant

The participant of this segment.

Returns
TypeDescription
Google\Cloud\ContactCenterInsights\V1\ConversationParticipant|null

hasSegmentParticipant

clearSegmentParticipant

setSegmentParticipant

The participant of this segment.

Parameter
NameDescription
var Google\Cloud\ContactCenterInsights\V1\ConversationParticipant
Returns
TypeDescription
$this

getDialogflowSegmentMetadata

CCAI metadata relating to the current transcript segment.

Returns
TypeDescription
Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata|null

hasDialogflowSegmentMetadata

clearDialogflowSegmentMetadata

setDialogflowSegmentMetadata

CCAI metadata relating to the current transcript segment.

Parameter
NameDescription
var Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata
Returns
TypeDescription
$this

getSentiment

The sentiment for this transcript segment.

Returns
TypeDescription
Google\Cloud\ContactCenterInsights\V1\SentimentData|null

hasSentiment

clearSentiment

setSentiment

The sentiment for this transcript segment.

Parameter
NameDescription
var Google\Cloud\ContactCenterInsights\V1\SentimentData
Returns
TypeDescription
$this