@Generated(value="software.amazon.awssdk:codegen") public class UtteranceEvent extends Object implements SdkPojo, Serializable, ToCopyableBuilder<UtteranceEvent.Builder,UtteranceEvent>, CallAnalyticsTranscriptResultStream
Contains set of transcription results from one or more audio segments, along with additional information about the parameters included in your request. For example, channel definitions, partial result stabilization, sentiment, and issue detection.
| Modifier and Type | Class and Description |
|---|---|
static interface |
UtteranceEvent.Builder |
protected static class |
UtteranceEvent.BuilderImpl |
CallAnalyticsTranscriptResultStream.EventTypeUNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
UtteranceEvent(UtteranceEvent.BuilderImpl builder) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(StartCallAnalyticsStreamTranscriptionResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype of
UtteranceEvent. |
Long |
beginOffsetMillis()
The time, in milliseconds, from the beginning of the audio stream to the start of the
UtteranceEvent
. |
static UtteranceEvent.Builder |
builder() |
UtteranceEvent |
copy(Consumer<? super UtteranceEvent.Builder> modifier) |
Long |
endOffsetMillis()
The time, in milliseconds, from the beginning of the audio stream to the start of the
UtteranceEvent
. |
List<CallAnalyticsEntity> |
entities()
Contains entities identified as personally identifiable information (PII) in your transcription output.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasEntities()
For responses, this returns true if the service returned a value for the Entities property.
|
int |
hashCode() |
boolean |
hasIssuesDetected()
For responses, this returns true if the service returned a value for the IssuesDetected property.
|
boolean |
hasItems()
For responses, this returns true if the service returned a value for the Items property.
|
Boolean |
isPartial()
Indicates whether the segment in the
UtteranceEvent is complete (FALSE) or partial (
TRUE). |
List<IssueDetected> |
issuesDetected()
Provides the issue that was detected in the specified segment.
|
List<CallAnalyticsItem> |
items()
Contains words, phrases, or punctuation marks that are associated with the specified
UtteranceEvent. |
ParticipantRole |
participantRole()
Provides the role of the speaker for each audio channel, either
CUSTOMER or AGENT. |
String |
participantRoleAsString()
Provides the role of the speaker for each audio channel, either
CUSTOMER or AGENT. |
List<SdkField<?>> |
sdkFields() |
Sentiment |
sentiment()
Provides the sentiment that was detected in the specified segment.
|
String |
sentimentAsString()
Provides the sentiment that was detected in the specified segment.
|
static Class<? extends UtteranceEvent.Builder> |
serializableBuilderClass() |
UtteranceEvent.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
transcript()
Contains transcribed text.
|
String |
utteranceId()
The unique identifier that is associated with the specified
UtteranceEvent. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcategoryEventBuilder, sdkEventType, utteranceEventBuilderprotected UtteranceEvent(UtteranceEvent.BuilderImpl builder)
public final String utteranceId()
The unique identifier that is associated with the specified UtteranceEvent.
UtteranceEvent.public final Boolean isPartial()
Indicates whether the segment in the UtteranceEvent is complete (FALSE) or partial (
TRUE).
UtteranceEvent is complete (FALSE) or
partial (TRUE).public final ParticipantRole participantRole()
Provides the role of the speaker for each audio channel, either CUSTOMER or AGENT.
If the service returns an enum value that is not available in the current SDK version, participantRole
will return ParticipantRole.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from participantRoleAsString().
CUSTOMER or
AGENT.ParticipantRolepublic final String participantRoleAsString()
Provides the role of the speaker for each audio channel, either CUSTOMER or AGENT.
If the service returns an enum value that is not available in the current SDK version, participantRole
will return ParticipantRole.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from participantRoleAsString().
CUSTOMER or
AGENT.ParticipantRolepublic final Long beginOffsetMillis()
The time, in milliseconds, from the beginning of the audio stream to the start of the UtteranceEvent
.
UtteranceEvent.public final Long endOffsetMillis()
The time, in milliseconds, from the beginning of the audio stream to the start of the UtteranceEvent
.
UtteranceEvent.public final String transcript()
Contains transcribed text.
public final boolean hasItems()
isEmpty() method on the property). This is useful
because the SDK will never return a null collection or map, but you may need to differentiate between the service
returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
if a value for the property was specified in the request builder, and false if a value was not specified.public final List<CallAnalyticsItem> items()
Contains words, phrases, or punctuation marks that are associated with the specified UtteranceEvent.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasItems() method.
UtteranceEvent.public final boolean hasEntities()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<CallAnalyticsEntity> entities()
Contains entities identified as personally identifiable information (PII) in your transcription output.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasEntities() method.
public final Sentiment sentiment()
Provides the sentiment that was detected in the specified segment.
If the service returns an enum value that is not available in the current SDK version, sentiment will
return Sentiment.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
sentimentAsString().
Sentimentpublic final String sentimentAsString()
Provides the sentiment that was detected in the specified segment.
If the service returns an enum value that is not available in the current SDK version, sentiment will
return Sentiment.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
sentimentAsString().
Sentimentpublic final boolean hasIssuesDetected()
isEmpty() method on the property).
This is useful because the SDK will never return a null collection or map, but you may need to differentiate
between the service returning nothing (or null) and the service returning an empty collection or map. For
requests, this returns true if a value for the property was specified in the request builder, and false if a
value was not specified.public final List<IssueDetected> issuesDetected()
Provides the issue that was detected in the specified segment.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasIssuesDetected() method.
public UtteranceEvent.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<UtteranceEvent.Builder,UtteranceEvent>public static UtteranceEvent.Builder builder()
public static Class<? extends UtteranceEvent.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final UtteranceEvent copy(Consumer<? super UtteranceEvent.Builder> modifier)
copy in interface ToCopyableBuilder<UtteranceEvent.Builder,UtteranceEvent>public void accept(StartCallAnalyticsStreamTranscriptionResponseHandler.Visitor visitor)
UtteranceEvent.accept in interface CallAnalyticsTranscriptResultStreamvisitor - Visitor to invoke.Copyright © 2023. All rights reserved.