commonMain.aws.sdk.kotlin.services.transcribestreaming.model.StartCallAnalyticsStreamTranscriptionRequest.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transcribestreaming.model
import aws.smithy.kotlin.runtime.SdkDsl
import kotlinx.coroutines.flow.Flow
public class StartCallAnalyticsStreamTranscriptionRequest private constructor(builder: Builder) {
/**
* An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.
*
* For more information, see [Transcribing streaming audio](https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html).
*/
public val audioStream: Flow? = builder.audioStream
/**
* Labels all personally identifiable information (PII) identified in your transcript.
*
* Content identification is performed at the segment level; PII specified in `PiiEntityTypes` is flagged upon complete transcription of an audio segment.
*
* You can’t set `ContentIdentificationType` and `ContentRedactionType` in the same request. If you set both, your request returns a `BadRequestException`.
*
* For more information, see [Redacting or identifying personally identifiable information](https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html).
*/
public val contentIdentificationType: aws.sdk.kotlin.services.transcribestreaming.model.ContentIdentificationType? = builder.contentIdentificationType
/**
* Redacts all personally identifiable information (PII) identified in your transcript.
*
* Content redaction is performed at the segment level; PII specified in `PiiEntityTypes` is redacted upon complete transcription of an audio segment.
*
* You can’t set `ContentRedactionType` and `ContentIdentificationType` in the same request. If you set both, your request returns a `BadRequestException`.
*
* For more information, see [Redacting or identifying personally identifiable information](https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html).
*/
public val contentRedactionType: aws.sdk.kotlin.services.transcribestreaming.model.ContentRedactionType? = builder.contentRedactionType
/**
* Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see [Partial-result stabilization](https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization).
*/
public val enablePartialResultsStabilization: kotlin.Boolean? = builder.enablePartialResultsStabilization
/**
* Specify the language code that represents the language spoken in your audio.
*
* If you're unsure of the language spoken in your audio, consider using `IdentifyLanguage` to enable automatic language identification.
*
* For a list of languages supported with streaming Call Analytics, refer to the [Supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) table.
*/
public val languageCode: aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsLanguageCode? = builder.languageCode
/**
* Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.
*
* The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.
*
* For more information, see [Custom language models](https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html).
*/
public val languageModelName: kotlin.String? = builder.languageModelName
/**
* Specify the encoding of your input audio. Supported formats are:
* + FLAC
* + OPUS-encoded audio in an Ogg container
* + PCM (only signed 16-bit little-endian audio formats, which does not include WAV)
*
* For more information, see [Media formats](https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio).
*/
public val mediaEncoding: aws.sdk.kotlin.services.transcribestreaming.model.MediaEncoding? = builder.mediaEncoding
/**
* The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.
*/
public val mediaSampleRateHertz: kotlin.Int? = builder.mediaSampleRateHertz
/**
* Specify the level of stability to use when you enable partial results stabilization (`EnablePartialResultsStabilization`).
*
* Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.
*
* For more information, see [Partial-result stabilization](https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization).
*/
public val partialResultsStability: aws.sdk.kotlin.services.transcribestreaming.model.PartialResultsStability? = builder.partialResultsStability
/**
* Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select `ALL`.
*
* To include `PiiEntityTypes` in your Call Analytics request, you must also include either `ContentIdentificationType` or `ContentRedactionType`.
*
* Values must be comma-separated and can include: `BANK_ACCOUNT_NUMBER`, `BANK_ROUTING`, `CREDIT_DEBIT_NUMBER`, `CREDIT_DEBIT_CVV`, `CREDIT_DEBIT_EXPIRY`, `PIN`, `EMAIL`, `ADDRESS`, `NAME`, `PHONE`, `SSN`, or `ALL`.
*/
public val piiEntityTypes: kotlin.String? = builder.piiEntityTypes
/**
* Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.
*
* You can use a session ID to retry a streaming session.
*/
public val sessionId: kotlin.String? = builder.sessionId
/**
* Specify how you want your vocabulary filter applied to your transcript.
*
* To replace words with `***`, choose `mask`.
*
* To delete words, choose `remove`.
*
* To flag words without changing them, choose `tag`.
*/
public val vocabularyFilterMethod: aws.sdk.kotlin.services.transcribestreaming.model.VocabularyFilterMethod? = builder.vocabularyFilterMethod
/**
* Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.
*
* If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.
*
* For more information, see [Using vocabulary filtering with unwanted words](https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html).
*/
public val vocabularyFilterName: kotlin.String? = builder.vocabularyFilterName
/**
* Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.
*
* If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.
*
* For more information, see [Custom vocabularies](https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html).
*/
public val vocabularyName: kotlin.String? = builder.vocabularyName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transcribestreaming.model.StartCallAnalyticsStreamTranscriptionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartCallAnalyticsStreamTranscriptionRequest(")
append("audioStream=$audioStream,")
append("contentIdentificationType=$contentIdentificationType,")
append("contentRedactionType=$contentRedactionType,")
append("enablePartialResultsStabilization=$enablePartialResultsStabilization,")
append("languageCode=$languageCode,")
append("languageModelName=$languageModelName,")
append("mediaEncoding=$mediaEncoding,")
append("mediaSampleRateHertz=$mediaSampleRateHertz,")
append("partialResultsStability=$partialResultsStability,")
append("piiEntityTypes=$piiEntityTypes,")
append("sessionId=$sessionId,")
append("vocabularyFilterMethod=$vocabularyFilterMethod,")
append("vocabularyFilterName=$vocabularyFilterName,")
append("vocabularyName=$vocabularyName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = audioStream?.hashCode() ?: 0
result = 31 * result + (contentIdentificationType?.hashCode() ?: 0)
result = 31 * result + (contentRedactionType?.hashCode() ?: 0)
result = 31 * result + (enablePartialResultsStabilization?.hashCode() ?: 0)
result = 31 * result + (languageCode?.hashCode() ?: 0)
result = 31 * result + (languageModelName?.hashCode() ?: 0)
result = 31 * result + (mediaEncoding?.hashCode() ?: 0)
result = 31 * result + (mediaSampleRateHertz ?: 0)
result = 31 * result + (partialResultsStability?.hashCode() ?: 0)
result = 31 * result + (piiEntityTypes?.hashCode() ?: 0)
result = 31 * result + (sessionId?.hashCode() ?: 0)
result = 31 * result + (vocabularyFilterMethod?.hashCode() ?: 0)
result = 31 * result + (vocabularyFilterName?.hashCode() ?: 0)
result = 31 * result + (vocabularyName?.hashCode() ?: 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 StartCallAnalyticsStreamTranscriptionRequest
if (audioStream != other.audioStream) return false
if (contentIdentificationType != other.contentIdentificationType) return false
if (contentRedactionType != other.contentRedactionType) return false
if (enablePartialResultsStabilization != other.enablePartialResultsStabilization) return false
if (languageCode != other.languageCode) return false
if (languageModelName != other.languageModelName) return false
if (mediaEncoding != other.mediaEncoding) return false
if (mediaSampleRateHertz != other.mediaSampleRateHertz) return false
if (partialResultsStability != other.partialResultsStability) return false
if (piiEntityTypes != other.piiEntityTypes) return false
if (sessionId != other.sessionId) return false
if (vocabularyFilterMethod != other.vocabularyFilterMethod) return false
if (vocabularyFilterName != other.vocabularyFilterName) return false
if (vocabularyName != other.vocabularyName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transcribestreaming.model.StartCallAnalyticsStreamTranscriptionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket data frames.
*
* For more information, see [Transcribing streaming audio](https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html).
*/
public var audioStream: Flow? = null
/**
* Labels all personally identifiable information (PII) identified in your transcript.
*
* Content identification is performed at the segment level; PII specified in `PiiEntityTypes` is flagged upon complete transcription of an audio segment.
*
* You can’t set `ContentIdentificationType` and `ContentRedactionType` in the same request. If you set both, your request returns a `BadRequestException`.
*
* For more information, see [Redacting or identifying personally identifiable information](https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html).
*/
public var contentIdentificationType: aws.sdk.kotlin.services.transcribestreaming.model.ContentIdentificationType? = null
/**
* Redacts all personally identifiable information (PII) identified in your transcript.
*
* Content redaction is performed at the segment level; PII specified in `PiiEntityTypes` is redacted upon complete transcription of an audio segment.
*
* You can’t set `ContentRedactionType` and `ContentIdentificationType` in the same request. If you set both, your request returns a `BadRequestException`.
*
* For more information, see [Redacting or identifying personally identifiable information](https://docs.aws.amazon.com/transcribe/latest/dg/pii-redaction.html).
*/
public var contentRedactionType: aws.sdk.kotlin.services.transcribestreaming.model.ContentRedactionType? = null
/**
* Enables partial result stabilization for your transcription. Partial result stabilization can reduce latency in your output, but may impact accuracy. For more information, see [Partial-result stabilization](https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization).
*/
public var enablePartialResultsStabilization: kotlin.Boolean? = null
/**
* Specify the language code that represents the language spoken in your audio.
*
* If you're unsure of the language spoken in your audio, consider using `IdentifyLanguage` to enable automatic language identification.
*
* For a list of languages supported with streaming Call Analytics, refer to the [Supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) table.
*/
public var languageCode: aws.sdk.kotlin.services.transcribestreaming.model.CallAnalyticsLanguageCode? = null
/**
* Specify the name of the custom language model that you want to use when processing your transcription. Note that language model names are case sensitive.
*
* The language of the specified language model must match the language code you specify in your transcription request. If the languages don't match, the custom language model isn't applied. There are no errors or warnings associated with a language mismatch.
*
* For more information, see [Custom language models](https://docs.aws.amazon.com/transcribe/latest/dg/custom-language-models.html).
*/
public var languageModelName: kotlin.String? = null
/**
* Specify the encoding of your input audio. Supported formats are:
* + FLAC
* + OPUS-encoded audio in an Ogg container
* + PCM (only signed 16-bit little-endian audio formats, which does not include WAV)
*
* For more information, see [Media formats](https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio).
*/
public var mediaEncoding: aws.sdk.kotlin.services.transcribestreaming.model.MediaEncoding? = null
/**
* The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.
*/
public var mediaSampleRateHertz: kotlin.Int? = null
/**
* Specify the level of stability to use when you enable partial results stabilization (`EnablePartialResultsStabilization`).
*
* Low stability provides the highest accuracy. High stability transcribes faster, but with slightly lower accuracy.
*
* For more information, see [Partial-result stabilization](https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#streaming-partial-result-stabilization).
*/
public var partialResultsStability: aws.sdk.kotlin.services.transcribestreaming.model.PartialResultsStability? = null
/**
* Specify which types of personally identifiable information (PII) you want to redact in your transcript. You can include as many types as you'd like, or you can select `ALL`.
*
* To include `PiiEntityTypes` in your Call Analytics request, you must also include either `ContentIdentificationType` or `ContentRedactionType`.
*
* Values must be comma-separated and can include: `BANK_ACCOUNT_NUMBER`, `BANK_ROUTING`, `CREDIT_DEBIT_NUMBER`, `CREDIT_DEBIT_CVV`, `CREDIT_DEBIT_EXPIRY`, `PIN`, `EMAIL`, `ADDRESS`, `NAME`, `PHONE`, `SSN`, or `ALL`.
*/
public var piiEntityTypes: kotlin.String? = null
/**
* Specify a name for your Call Analytics transcription session. If you don't include this parameter in your request, Amazon Transcribe generates an ID and returns it in the response.
*
* You can use a session ID to retry a streaming session.
*/
public var sessionId: kotlin.String? = null
/**
* Specify how you want your vocabulary filter applied to your transcript.
*
* To replace words with `***`, choose `mask`.
*
* To delete words, choose `remove`.
*
* To flag words without changing them, choose `tag`.
*/
public var vocabularyFilterMethod: aws.sdk.kotlin.services.transcribestreaming.model.VocabularyFilterMethod? = null
/**
* Specify the name of the custom vocabulary filter that you want to use when processing your transcription. Note that vocabulary filter names are case sensitive.
*
* If the language of the specified custom vocabulary filter doesn't match the language identified in your media, the vocabulary filter is not applied to your transcription.
*
* For more information, see [Using vocabulary filtering with unwanted words](https://docs.aws.amazon.com/transcribe/latest/dg/vocabulary-filtering.html).
*/
public var vocabularyFilterName: kotlin.String? = null
/**
* Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive.
*
* If the language of the specified custom vocabulary doesn't match the language identified in your media, the custom vocabulary is not applied to your transcription.
*
* For more information, see [Custom vocabularies](https://docs.aws.amazon.com/transcribe/latest/dg/custom-vocabulary.html).
*/
public var vocabularyName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transcribestreaming.model.StartCallAnalyticsStreamTranscriptionRequest) : this() {
this.audioStream = x.audioStream
this.contentIdentificationType = x.contentIdentificationType
this.contentRedactionType = x.contentRedactionType
this.enablePartialResultsStabilization = x.enablePartialResultsStabilization
this.languageCode = x.languageCode
this.languageModelName = x.languageModelName
this.mediaEncoding = x.mediaEncoding
this.mediaSampleRateHertz = x.mediaSampleRateHertz
this.partialResultsStability = x.partialResultsStability
this.piiEntityTypes = x.piiEntityTypes
this.sessionId = x.sessionId
this.vocabularyFilterMethod = x.vocabularyFilterMethod
this.vocabularyFilterName = x.vocabularyFilterName
this.vocabularyName = x.vocabularyName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transcribestreaming.model.StartCallAnalyticsStreamTranscriptionRequest = StartCallAnalyticsStreamTranscriptionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy