Class UtteranceEvent
- java.lang.Object
-
- software.amazon.awssdk.services.transcribestreaming.model.UtteranceEvent
-
- All Implemented Interfaces:
Serializable,SdkPojo,CallAnalyticsTranscriptResultStream,ToCopyableBuilder<UtteranceEvent.Builder,UtteranceEvent>
- Direct Known Subclasses:
DefaultUtteranceEvent
@Generated("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.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceUtteranceEvent.Builderprotected static classUtteranceEvent.BuilderImpl-
Nested classes/interfaces inherited from interface software.amazon.awssdk.services.transcribestreaming.model.CallAnalyticsTranscriptResultStream
CallAnalyticsTranscriptResultStream.EventType
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.services.transcribestreaming.model.CallAnalyticsTranscriptResultStream
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUtteranceEvent(UtteranceEvent.BuilderImpl builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StartCallAnalyticsStreamTranscriptionResponseHandler.Visitor visitor)Calls the appropriate visit method depending on the subtype ofUtteranceEvent.LongbeginOffsetMillis()The time, in milliseconds, from the beginning of the audio stream to the start of theUtteranceEvent.static UtteranceEvent.Builderbuilder()UtteranceEventcopy(Consumer<? super UtteranceEvent.Builder> modifier)LongendOffsetMillis()The time, in milliseconds, from the beginning of the audio stream to the start of theUtteranceEvent.List<CallAnalyticsEntity>entities()Contains entities identified as personally identifiable information (PII) in your transcription output.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasEntities()For responses, this returns true if the service returned a value for the Entities property.inthashCode()booleanhasIssuesDetected()For responses, this returns true if the service returned a value for the IssuesDetected property.booleanhasItems()For responses, this returns true if the service returned a value for the Items property.BooleanisPartial()Indicates whether the segment in theUtteranceEventis 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 specifiedUtteranceEvent.ParticipantRoleparticipantRole()Provides the role of the speaker for each audio channel, eitherCUSTOMERorAGENT.StringparticipantRoleAsString()Provides the role of the speaker for each audio channel, eitherCUSTOMERorAGENT.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()Sentimentsentiment()Provides the sentiment that was detected in the specified segment.StringsentimentAsString()Provides the sentiment that was detected in the specified segment.static Class<? extends UtteranceEvent.Builder>serializableBuilderClass()UtteranceEvent.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringtranscript()Contains transcribed text.StringutteranceId()The unique identifier that is associated with the specifiedUtteranceEvent.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.transcribestreaming.model.CallAnalyticsTranscriptResultStream
sdkEventType
-
-
-
-
Constructor Detail
-
UtteranceEvent
protected UtteranceEvent(UtteranceEvent.BuilderImpl builder)
-
-
Method Detail
-
utteranceId
public final String utteranceId()
The unique identifier that is associated with the specified
UtteranceEvent.- Returns:
- The unique identifier that is associated with the specified
UtteranceEvent.
-
isPartial
public final Boolean isPartial()
Indicates whether the segment in the
UtteranceEventis complete (FALSE) or partial (TRUE).- Returns:
- Indicates whether the segment in the
UtteranceEventis complete (FALSE) or partial (TRUE).
-
participantRole
public final ParticipantRole participantRole()
Provides the role of the speaker for each audio channel, either
CUSTOMERorAGENT.If the service returns an enum value that is not available in the current SDK version,
participantRolewill returnParticipantRole.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromparticipantRoleAsString().- Returns:
- Provides the role of the speaker for each audio channel, either
CUSTOMERorAGENT. - See Also:
ParticipantRole
-
participantRoleAsString
public final String participantRoleAsString()
Provides the role of the speaker for each audio channel, either
CUSTOMERorAGENT.If the service returns an enum value that is not available in the current SDK version,
participantRolewill returnParticipantRole.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromparticipantRoleAsString().- Returns:
- Provides the role of the speaker for each audio channel, either
CUSTOMERorAGENT. - See Also:
ParticipantRole
-
beginOffsetMillis
public final Long beginOffsetMillis()
The time, in milliseconds, from the beginning of the audio stream to the start of the
UtteranceEvent.- Returns:
- The time, in milliseconds, from the beginning of the audio stream to the start of the
UtteranceEvent.
-
endOffsetMillis
public final Long endOffsetMillis()
The time, in milliseconds, from the beginning of the audio stream to the start of the
UtteranceEvent.- Returns:
- The time, in milliseconds, from the beginning of the audio stream to the start of the
UtteranceEvent.
-
transcript
public final String transcript()
Contains transcribed text.
- Returns:
- Contains transcribed text.
-
hasItems
public final boolean hasItems()
For responses, this returns true if the service returned a value for the Items property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
items
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.- Returns:
- Contains words, phrases, or punctuation marks that are associated with the specified
UtteranceEvent.
-
hasEntities
public final boolean hasEntities()
For responses, this returns true if the service returned a value for the Entities property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
entities
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.- Returns:
- Contains entities identified as personally identifiable information (PII) in your transcription output.
-
sentiment
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,
sentimentwill returnSentiment.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsentimentAsString().- Returns:
- Provides the sentiment that was detected in the specified segment.
- See Also:
Sentiment
-
sentimentAsString
public 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,
sentimentwill returnSentiment.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsentimentAsString().- Returns:
- Provides the sentiment that was detected in the specified segment.
- See Also:
Sentiment
-
hasIssuesDetected
public final boolean hasIssuesDetected()
For responses, this returns true if the service returned a value for the IssuesDetected property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()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.
-
issuesDetected
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.- Returns:
- Provides the issue that was detected in the specified segment.
-
toBuilder
public UtteranceEvent.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<UtteranceEvent.Builder,UtteranceEvent>
-
builder
public static UtteranceEvent.Builder builder()
-
serializableBuilderClass
public static Class<? extends UtteranceEvent.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
copy
public final UtteranceEvent copy(Consumer<? super UtteranceEvent.Builder> modifier)
- Specified by:
copyin interfaceToCopyableBuilder<UtteranceEvent.Builder,UtteranceEvent>
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
accept
public void accept(StartCallAnalyticsStreamTranscriptionResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofUtteranceEvent.- Specified by:
acceptin interfaceCallAnalyticsTranscriptResultStream- Parameters:
visitor- Visitor to invoke.
-
-