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

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
Name Description
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
Type Description
Google\Protobuf\Timestamp|null

hasMessageTime

clearMessageTime

setMessageTime

The time that the message occurred, if provided.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getText

The text of this segment.

Returns
Type Description
string

setText

The text of this segment.

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var float
Returns
Type Description
$this

getWords

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setWords

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

Parameter
Name Description
var array<Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\WordInfo>
Returns
Type Description
$this

getLanguageCode

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

Example: "en-US".

Returns
Type Description
string

setLanguageCode

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

Example: "en-US".

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var int
Returns
Type Description
$this

getSegmentParticipant

The participant of this segment.

Returns
Type Description
Google\Cloud\ContactCenterInsights\V1\ConversationParticipant|null

hasSegmentParticipant

clearSegmentParticipant

setSegmentParticipant

The participant of this segment.

Parameter
Name Description
var Google\Cloud\ContactCenterInsights\V1\ConversationParticipant
Returns
Type Description
$this

getDialogflowSegmentMetadata

CCAI metadata relating to the current transcript segment.

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

hasDialogflowSegmentMetadata

clearDialogflowSegmentMetadata

setDialogflowSegmentMetadata

CCAI metadata relating to the current transcript segment.

Parameter
Name Description
var Google\Cloud\ContactCenterInsights\V1\Conversation\Transcript\TranscriptSegment\DialogflowSegmentMetadata
Returns
Type Description
$this

getSentiment

The sentiment for this transcript segment.

Returns
Type Description
Google\Cloud\ContactCenterInsights\V1\SentimentData|null

hasSentiment

clearSentiment

setSentiment

The sentiment for this transcript segment.

Parameter
Name Description
var Google\Cloud\ContactCenterInsights\V1\SentimentData
Returns
Type Description
$this