commonMain.aws.sdk.kotlin.services.transcribestreaming.model.AudioEvent.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 wrapper for your audio chunks. Your audio stream consists of one or more audio events, which consist of one or more audio chunks.
*
* For more information, see [Event stream encoding](https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html).
*/
public class AudioEvent private constructor(builder: Builder) {
/**
* An audio blob that contains the next part of the audio that you want to transcribe. The maximum audio chunk size is 32 KB.
*/
public val audioChunk: kotlin.ByteArray? = builder.audioChunk
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transcribestreaming.model.AudioEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AudioEvent(")
append("audioChunk=$audioChunk")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = audioChunk?.contentHashCode() ?: 0
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 AudioEvent
if (audioChunk != null) {
if (other.audioChunk == null) return false
if (!audioChunk.contentEquals(other.audioChunk)) return false
} else if (other.audioChunk != null) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transcribestreaming.model.AudioEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An audio blob that contains the next part of the audio that you want to transcribe. The maximum audio chunk size is 32 KB.
*/
public var audioChunk: kotlin.ByteArray? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transcribestreaming.model.AudioEvent) : this() {
this.audioChunk = x.audioChunk
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transcribestreaming.model.AudioEvent = AudioEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy