import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { StartStreamTranscriptionRequest, StartStreamTranscriptionResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link StartStreamTranscriptionCommand}. */ export interface StartStreamTranscriptionCommandInput extends StartStreamTranscriptionRequest { } /** * @public * * The output of {@link StartStreamTranscriptionCommand}. */ export interface StartStreamTranscriptionCommandOutput extends StartStreamTranscriptionResponse, __MetadataBearer { } declare const StartStreamTranscriptionCommand_base: { new (input: StartStreamTranscriptionCommandInput): import("@smithy/core/client").CommandImpl; new (input: StartStreamTranscriptionCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to * Amazon Transcribe and the transcription results are streamed to your application.

*

The following parameters are required:

* *

For more information on streaming with Amazon Transcribe, see Transcribing streaming audio.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { TranscribeStreamingClient, StartStreamTranscriptionCommand } from "@aws-sdk/client-transcribe-streaming"; // ES Modules import * // const { TranscribeStreamingClient, StartStreamTranscriptionCommand } = require("@aws-sdk/client-transcribe-streaming"); // CommonJS import * // import type { TranscribeStreamingClientConfig } from "@aws-sdk/client-transcribe-streaming"; * const config = {}; // type is TranscribeStreamingClientConfig * const client = new TranscribeStreamingClient(config); * const input = { // StartStreamTranscriptionRequest * LanguageCode: "en-US" || "en-GB" || "es-US" || "fr-CA" || "fr-FR" || "en-AU" || "it-IT" || "de-DE" || "pt-BR" || "ja-JP" || "ko-KR" || "zh-CN" || "th-TH" || "es-ES" || "ar-SA" || "pt-PT" || "ca-ES" || "ar-AE" || "hi-IN" || "zh-HK" || "nl-NL" || "no-NO" || "sv-SE" || "pl-PL" || "fi-FI" || "zh-TW" || "en-IN" || "en-IE" || "en-NZ" || "en-AB" || "en-ZA" || "en-WL" || "de-CH" || "af-ZA" || "eu-ES" || "hr-HR" || "cs-CZ" || "da-DK" || "fa-IR" || "gl-ES" || "el-GR" || "he-IL" || "id-ID" || "lv-LV" || "ms-MY" || "ro-RO" || "ru-RU" || "sr-RS" || "sk-SK" || "so-SO" || "tl-PH" || "uk-UA" || "vi-VN" || "zu-ZA" || "am-ET" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ckb-IQ" || "ckb-IR" || "cy-WL" || "es-MX" || "et-ET" || "fa-AF" || "gu-IN" || "ht-HT" || "hu-HU" || "hy-AM" || "is-IS" || "jv-ID" || "ka-GE" || "kab-DZ" || "kk-KZ" || "km-KH" || "kn-IN" || "lg-IN" || "lt-LT" || "mk-MK" || "ml-IN" || "mr-IN" || "my-MM" || "ne-NP" || "or-IN" || "pa-IN" || "ps-AF" || "si-LK" || "sl-SI" || "sq-AL" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "ta-IN" || "te-IN" || "tr-TR" || "uz-UZ", * MediaSampleRateHertz: Number("int"), // required * MediaEncoding: "pcm" || "ogg-opus" || "flac" || "g711-alaw" || "g711-ulaw" || "g729", // required * VocabularyName: "STRING_VALUE", * SessionId: "STRING_VALUE", * AudioStream: { // AudioStream Union: only one key present * AudioEvent: { // AudioEvent * AudioChunk: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") * }, * ConfigurationEvent: { // ConfigurationEvent * ChannelDefinitions: [ // ChannelDefinitions * { // ChannelDefinition * ChannelId: Number("int"), // required * ParticipantRole: "AGENT" || "CUSTOMER", // required * }, * ], * PostCallAnalyticsSettings: { // PostCallAnalyticsSettings * OutputLocation: "STRING_VALUE", // required * DataAccessRoleArn: "STRING_VALUE", // required * ContentRedactionOutput: "redacted" || "redacted_and_unredacted", * OutputEncryptionKMSKeyId: "STRING_VALUE", * }, * }, * }, * VocabularyFilterName: "STRING_VALUE", * VocabularyFilterMethod: "remove" || "mask" || "tag", * ShowSpeakerLabel: true || false, * EnableChannelIdentification: true || false, * NumberOfChannels: Number("int"), * EnablePartialResultsStabilization: true || false, * PartialResultsStability: "high" || "medium" || "low", * ContentIdentificationType: "PII", * ContentRedactionType: "PII", * PiiEntityTypes: "STRING_VALUE", * LanguageModelName: "STRING_VALUE", * IdentifyLanguage: true || false, * LanguageOptions: "STRING_VALUE", * PreferredLanguage: "en-US" || "en-GB" || "es-US" || "fr-CA" || "fr-FR" || "en-AU" || "it-IT" || "de-DE" || "pt-BR" || "ja-JP" || "ko-KR" || "zh-CN" || "th-TH" || "es-ES" || "ar-SA" || "pt-PT" || "ca-ES" || "ar-AE" || "hi-IN" || "zh-HK" || "nl-NL" || "no-NO" || "sv-SE" || "pl-PL" || "fi-FI" || "zh-TW" || "en-IN" || "en-IE" || "en-NZ" || "en-AB" || "en-ZA" || "en-WL" || "de-CH" || "af-ZA" || "eu-ES" || "hr-HR" || "cs-CZ" || "da-DK" || "fa-IR" || "gl-ES" || "el-GR" || "he-IL" || "id-ID" || "lv-LV" || "ms-MY" || "ro-RO" || "ru-RU" || "sr-RS" || "sk-SK" || "so-SO" || "tl-PH" || "uk-UA" || "vi-VN" || "zu-ZA" || "am-ET" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ckb-IQ" || "ckb-IR" || "cy-WL" || "es-MX" || "et-ET" || "fa-AF" || "gu-IN" || "ht-HT" || "hu-HU" || "hy-AM" || "is-IS" || "jv-ID" || "ka-GE" || "kab-DZ" || "kk-KZ" || "km-KH" || "kn-IN" || "lg-IN" || "lt-LT" || "mk-MK" || "ml-IN" || "mr-IN" || "my-MM" || "ne-NP" || "or-IN" || "pa-IN" || "ps-AF" || "si-LK" || "sl-SI" || "sq-AL" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "ta-IN" || "te-IN" || "tr-TR" || "uz-UZ", * IdentifyMultipleLanguages: true || false, * VocabularyNames: "STRING_VALUE", * VocabularyFilterNames: "STRING_VALUE", * SessionResumeWindow: Number("int"), * TranscriptFormat: "spoken" || "written", * }; * const command = new StartStreamTranscriptionCommand(input); * const response = await client.send(command); * // { // StartStreamTranscriptionResponse * // RequestId: "STRING_VALUE", * // LanguageCode: "en-US" || "en-GB" || "es-US" || "fr-CA" || "fr-FR" || "en-AU" || "it-IT" || "de-DE" || "pt-BR" || "ja-JP" || "ko-KR" || "zh-CN" || "th-TH" || "es-ES" || "ar-SA" || "pt-PT" || "ca-ES" || "ar-AE" || "hi-IN" || "zh-HK" || "nl-NL" || "no-NO" || "sv-SE" || "pl-PL" || "fi-FI" || "zh-TW" || "en-IN" || "en-IE" || "en-NZ" || "en-AB" || "en-ZA" || "en-WL" || "de-CH" || "af-ZA" || "eu-ES" || "hr-HR" || "cs-CZ" || "da-DK" || "fa-IR" || "gl-ES" || "el-GR" || "he-IL" || "id-ID" || "lv-LV" || "ms-MY" || "ro-RO" || "ru-RU" || "sr-RS" || "sk-SK" || "so-SO" || "tl-PH" || "uk-UA" || "vi-VN" || "zu-ZA" || "am-ET" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ckb-IQ" || "ckb-IR" || "cy-WL" || "es-MX" || "et-ET" || "fa-AF" || "gu-IN" || "ht-HT" || "hu-HU" || "hy-AM" || "is-IS" || "jv-ID" || "ka-GE" || "kab-DZ" || "kk-KZ" || "km-KH" || "kn-IN" || "lg-IN" || "lt-LT" || "mk-MK" || "ml-IN" || "mr-IN" || "my-MM" || "ne-NP" || "or-IN" || "pa-IN" || "ps-AF" || "si-LK" || "sl-SI" || "sq-AL" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "ta-IN" || "te-IN" || "tr-TR" || "uz-UZ", * // MediaSampleRateHertz: Number("int"), * // MediaEncoding: "pcm" || "ogg-opus" || "flac" || "g711-alaw" || "g711-ulaw" || "g729", * // VocabularyName: "STRING_VALUE", * // SessionId: "STRING_VALUE", * // TranscriptResultStream: { // TranscriptResultStream Union: only one key present * // TranscriptEvent: { // TranscriptEvent * // Transcript: { // Transcript * // Results: [ // ResultList * // { // Result * // ResultId: "STRING_VALUE", * // StartTime: Number("double"), * // EndTime: Number("double"), * // IsPartial: true || false, * // Alternatives: [ // AlternativeList * // { // Alternative * // Transcript: "STRING_VALUE", * // Items: [ // ItemList * // { // Item * // StartTime: Number("double"), * // EndTime: Number("double"), * // Type: "pronunciation" || "punctuation", * // Content: "STRING_VALUE", * // VocabularyFilterMatch: true || false, * // Speaker: "STRING_VALUE", * // Confidence: Number("double"), * // Stable: true || false, * // }, * // ], * // Entities: [ // EntityList * // { // Entity * // StartTime: Number("double"), * // EndTime: Number("double"), * // Category: "STRING_VALUE", * // Type: "STRING_VALUE", * // Content: "STRING_VALUE", * // Confidence: Number("double"), * // }, * // ], * // }, * // ], * // ChannelId: "STRING_VALUE", * // LanguageCode: "en-US" || "en-GB" || "es-US" || "fr-CA" || "fr-FR" || "en-AU" || "it-IT" || "de-DE" || "pt-BR" || "ja-JP" || "ko-KR" || "zh-CN" || "th-TH" || "es-ES" || "ar-SA" || "pt-PT" || "ca-ES" || "ar-AE" || "hi-IN" || "zh-HK" || "nl-NL" || "no-NO" || "sv-SE" || "pl-PL" || "fi-FI" || "zh-TW" || "en-IN" || "en-IE" || "en-NZ" || "en-AB" || "en-ZA" || "en-WL" || "de-CH" || "af-ZA" || "eu-ES" || "hr-HR" || "cs-CZ" || "da-DK" || "fa-IR" || "gl-ES" || "el-GR" || "he-IL" || "id-ID" || "lv-LV" || "ms-MY" || "ro-RO" || "ru-RU" || "sr-RS" || "sk-SK" || "so-SO" || "tl-PH" || "uk-UA" || "vi-VN" || "zu-ZA" || "am-ET" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ckb-IQ" || "ckb-IR" || "cy-WL" || "es-MX" || "et-ET" || "fa-AF" || "gu-IN" || "ht-HT" || "hu-HU" || "hy-AM" || "is-IS" || "jv-ID" || "ka-GE" || "kab-DZ" || "kk-KZ" || "km-KH" || "kn-IN" || "lg-IN" || "lt-LT" || "mk-MK" || "ml-IN" || "mr-IN" || "my-MM" || "ne-NP" || "or-IN" || "pa-IN" || "ps-AF" || "si-LK" || "sl-SI" || "sq-AL" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "ta-IN" || "te-IN" || "tr-TR" || "uz-UZ", * // LanguageIdentification: [ // LanguageIdentification * // { // LanguageWithScore * // LanguageCode: "en-US" || "en-GB" || "es-US" || "fr-CA" || "fr-FR" || "en-AU" || "it-IT" || "de-DE" || "pt-BR" || "ja-JP" || "ko-KR" || "zh-CN" || "th-TH" || "es-ES" || "ar-SA" || "pt-PT" || "ca-ES" || "ar-AE" || "hi-IN" || "zh-HK" || "nl-NL" || "no-NO" || "sv-SE" || "pl-PL" || "fi-FI" || "zh-TW" || "en-IN" || "en-IE" || "en-NZ" || "en-AB" || "en-ZA" || "en-WL" || "de-CH" || "af-ZA" || "eu-ES" || "hr-HR" || "cs-CZ" || "da-DK" || "fa-IR" || "gl-ES" || "el-GR" || "he-IL" || "id-ID" || "lv-LV" || "ms-MY" || "ro-RO" || "ru-RU" || "sr-RS" || "sk-SK" || "so-SO" || "tl-PH" || "uk-UA" || "vi-VN" || "zu-ZA" || "am-ET" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ckb-IQ" || "ckb-IR" || "cy-WL" || "es-MX" || "et-ET" || "fa-AF" || "gu-IN" || "ht-HT" || "hu-HU" || "hy-AM" || "is-IS" || "jv-ID" || "ka-GE" || "kab-DZ" || "kk-KZ" || "km-KH" || "kn-IN" || "lg-IN" || "lt-LT" || "mk-MK" || "ml-IN" || "mr-IN" || "my-MM" || "ne-NP" || "or-IN" || "pa-IN" || "ps-AF" || "si-LK" || "sl-SI" || "sq-AL" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "ta-IN" || "te-IN" || "tr-TR" || "uz-UZ", * // Score: Number("double"), * // }, * // ], * // }, * // ], * // }, * // }, * // BadRequestException: { // BadRequestException * // Message: "STRING_VALUE", * // }, * // LimitExceededException: { // LimitExceededException * // Message: "STRING_VALUE", * // }, * // InternalFailureException: { // InternalFailureException * // Message: "STRING_VALUE", * // }, * // ConflictException: { // ConflictException * // Message: "STRING_VALUE", * // }, * // ServiceUnavailableException: { // ServiceUnavailableException * // Message: "STRING_VALUE", * // }, * // }, * // VocabularyFilterName: "STRING_VALUE", * // VocabularyFilterMethod: "remove" || "mask" || "tag", * // ShowSpeakerLabel: true || false, * // EnableChannelIdentification: true || false, * // NumberOfChannels: Number("int"), * // EnablePartialResultsStabilization: true || false, * // PartialResultsStability: "high" || "medium" || "low", * // ContentIdentificationType: "PII", * // ContentRedactionType: "PII", * // PiiEntityTypes: "STRING_VALUE", * // LanguageModelName: "STRING_VALUE", * // IdentifyLanguage: true || false, * // LanguageOptions: "STRING_VALUE", * // PreferredLanguage: "en-US" || "en-GB" || "es-US" || "fr-CA" || "fr-FR" || "en-AU" || "it-IT" || "de-DE" || "pt-BR" || "ja-JP" || "ko-KR" || "zh-CN" || "th-TH" || "es-ES" || "ar-SA" || "pt-PT" || "ca-ES" || "ar-AE" || "hi-IN" || "zh-HK" || "nl-NL" || "no-NO" || "sv-SE" || "pl-PL" || "fi-FI" || "zh-TW" || "en-IN" || "en-IE" || "en-NZ" || "en-AB" || "en-ZA" || "en-WL" || "de-CH" || "af-ZA" || "eu-ES" || "hr-HR" || "cs-CZ" || "da-DK" || "fa-IR" || "gl-ES" || "el-GR" || "he-IL" || "id-ID" || "lv-LV" || "ms-MY" || "ro-RO" || "ru-RU" || "sr-RS" || "sk-SK" || "so-SO" || "tl-PH" || "uk-UA" || "vi-VN" || "zu-ZA" || "am-ET" || "be-BY" || "bg-BG" || "bn-IN" || "bs-BA" || "ckb-IQ" || "ckb-IR" || "cy-WL" || "es-MX" || "et-ET" || "fa-AF" || "gu-IN" || "ht-HT" || "hu-HU" || "hy-AM" || "is-IS" || "jv-ID" || "ka-GE" || "kab-DZ" || "kk-KZ" || "km-KH" || "kn-IN" || "lg-IN" || "lt-LT" || "mk-MK" || "ml-IN" || "mr-IN" || "my-MM" || "ne-NP" || "or-IN" || "pa-IN" || "ps-AF" || "si-LK" || "sl-SI" || "sq-AL" || "su-ID" || "sw-BI" || "sw-KE" || "sw-RW" || "sw-TZ" || "sw-UG" || "ta-IN" || "te-IN" || "tr-TR" || "uz-UZ", * // IdentifyMultipleLanguages: true || false, * // VocabularyNames: "STRING_VALUE", * // VocabularyFilterNames: "STRING_VALUE", * // SessionResumeWindow: Number("int"), * // TranscriptFormat: "spoken" || "written", * // }; * * ``` * * @param StartStreamTranscriptionCommandInput - {@link StartStreamTranscriptionCommandInput} * @returns {@link StartStreamTranscriptionCommandOutput} * @see {@link StartStreamTranscriptionCommandInput} for command's `input` shape. * @see {@link StartStreamTranscriptionCommandOutput} for command's `response` shape. * @see {@link TranscribeStreamingClientResolvedConfig | config} for TranscribeStreamingClient's `config` shape. * * @throws {@link BadRequestException} (client fault) *

One or more arguments to the StartStreamTranscription, * StartMedicalStreamTranscription, or StartCallAnalyticsStreamTranscription * operation was not valid. For example, MediaEncoding or LanguageCode * used unsupported values. Check the specified parameters and try your request again.

* * @throws {@link ConflictException} (client fault) *

A new stream started with the same session ID. The current stream has been terminated.

* * @throws {@link InternalFailureException} (server fault) *

A problem occurred while processing the audio. Amazon Transcribe terminated * processing.

* * @throws {@link LimitExceededException} (client fault) *

Your client has exceeded one of the Amazon Transcribe limits, typically the concurrent stream * service quota. This error can also occur if a stream exceeds the maximum session duration. In rare * cases, this error can also occur if you increase your number of concurrent streams too quickly. * Reduce your number of concurrent streams and try your request again using an exponential backoff * strategy.

* * @throws {@link ServiceUnavailableException} (server fault) *

The service is currently unavailable. Try your request later.

* * @throws {@link TranscribeStreamingServiceException} *

Base exception class for all service exceptions from TranscribeStreaming service.

* * * @public */ export declare class StartStreamTranscriptionCommand extends StartStreamTranscriptionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: StartStreamTranscriptionRequest; output: StartStreamTranscriptionResponse; }; sdk: { input: StartStreamTranscriptionCommandInput; output: StartStreamTranscriptionCommandOutput; }; }; }