commonMain.aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsItem.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transcribestreaming-jvm Show documentation
Show all versions of transcribestreaming-jvm Show documentation
The AWS SDK for Kotlin client for Transcribe Streaming
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transcribestreaming.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A word, phrase, or punctuation mark in your Call Analytics transcription output, along with various associated attributes, such as confidence score, type, and start and end times.
*/
public class CallAnalyticsItem private constructor(builder: Builder) {
/**
* The time, in milliseconds, from the beginning of the audio stream to the start of the identified item.
*/
public val beginOffsetMillis: kotlin.Long? = builder.beginOffsetMillis
/**
* The confidence score associated with a word or phrase in your transcript.
*
* Confidence scores are values between 0 and 1. A larger value indicates a higher probability that the identified item correctly matches the item spoken in your media.
*/
public val confidence: kotlin.Double? = builder.confidence
/**
* The word or punctuation that was transcribed.
*/
public val content: kotlin.String? = builder.content
/**
* The time, in milliseconds, from the beginning of the audio stream to the end of the identified item.
*/
public val endOffsetMillis: kotlin.Long? = builder.endOffsetMillis
/**
* If partial result stabilization is enabled, `Stable` indicates whether the specified item is stable (`true`) or if it may change when the segment is complete (`false`).
*/
public val stable: kotlin.Boolean? = builder.stable
/**
* The type of item identified. Options are: `PRONUNCIATION` (spoken words) and `PUNCTUATION`.
*/
public val type: aws.sdk.kotlin.services.transcribestreaming.model.ItemType? = builder.type
/**
* Indicates whether the specified item matches a word in the vocabulary filter included in your Call Analytics request. If `true`, there is a vocabulary filter match.
*/
public val vocabularyFilterMatch: kotlin.Boolean = builder.vocabularyFilterMatch
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CallAnalyticsItem(")
append("beginOffsetMillis=$beginOffsetMillis,")
append("confidence=$confidence,")
append("content=$content,")
append("endOffsetMillis=$endOffsetMillis,")
append("stable=$stable,")
append("type=$type,")
append("vocabularyFilterMatch=$vocabularyFilterMatch")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginOffsetMillis?.hashCode() ?: 0
result = 31 * result + (confidence?.hashCode() ?: 0)
result = 31 * result + (content?.hashCode() ?: 0)
result = 31 * result + (endOffsetMillis?.hashCode() ?: 0)
result = 31 * result + (stable?.hashCode() ?: 0)
result = 31 * result + (type?.hashCode() ?: 0)
result = 31 * result + (vocabularyFilterMatch.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as CallAnalyticsItem
if (beginOffsetMillis != other.beginOffsetMillis) return false
if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
if (content != other.content) return false
if (endOffsetMillis != other.endOffsetMillis) return false
if (stable != other.stable) return false
if (type != other.type) return false
if (vocabularyFilterMatch != other.vocabularyFilterMatch) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsItem = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The time, in milliseconds, from the beginning of the audio stream to the start of the identified item.
*/
public var beginOffsetMillis: kotlin.Long? = null
/**
* The confidence score associated with a word or phrase in your transcript.
*
* Confidence scores are values between 0 and 1. A larger value indicates a higher probability that the identified item correctly matches the item spoken in your media.
*/
public var confidence: kotlin.Double? = null
/**
* The word or punctuation that was transcribed.
*/
public var content: kotlin.String? = null
/**
* The time, in milliseconds, from the beginning of the audio stream to the end of the identified item.
*/
public var endOffsetMillis: kotlin.Long? = null
/**
* If partial result stabilization is enabled, `Stable` indicates whether the specified item is stable (`true`) or if it may change when the segment is complete (`false`).
*/
public var stable: kotlin.Boolean? = null
/**
* The type of item identified. Options are: `PRONUNCIATION` (spoken words) and `PUNCTUATION`.
*/
public var type: aws.sdk.kotlin.services.transcribestreaming.model.ItemType? = null
/**
* Indicates whether the specified item matches a word in the vocabulary filter included in your Call Analytics request. If `true`, there is a vocabulary filter match.
*/
public var vocabularyFilterMatch: kotlin.Boolean = false
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsItem) : this() {
this.beginOffsetMillis = x.beginOffsetMillis
this.confidence = x.confidence
this.content = x.content
this.endOffsetMillis = x.endOffsetMillis
this.stable = x.stable
this.type = x.type
this.vocabularyFilterMatch = x.vocabularyFilterMatch
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsItem = CallAnalyticsItem(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy