@aws-sdk/client-transcribe-streaming 3.202.0 → 3.207.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,10 +74,12 @@ var LanguageCode;
74
74
  LanguageCode["ES_US"] = "es-US";
75
75
  LanguageCode["FR_CA"] = "fr-CA";
76
76
  LanguageCode["FR_FR"] = "fr-FR";
77
+ LanguageCode["HI_IN"] = "hi-IN";
77
78
  LanguageCode["IT_IT"] = "it-IT";
78
79
  LanguageCode["JA_JP"] = "ja-JP";
79
80
  LanguageCode["KO_KR"] = "ko-KR";
80
81
  LanguageCode["PT_BR"] = "pt-BR";
82
+ LanguageCode["TH_TH"] = "th-TH";
81
83
  LanguageCode["ZH_CN"] = "zh-CN";
82
84
  })(LanguageCode = exports.LanguageCode || (exports.LanguageCode = {}));
83
85
  class LimitExceededException extends TranscribeStreamingServiceException_1.TranscribeStreamingServiceException {
@@ -10,7 +10,6 @@ const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
10
10
  const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
11
11
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
12
12
  const middleware_sdk_transcribe_streaming_1 = require("@aws-sdk/middleware-sdk-transcribe-streaming");
13
- const util_base64_browser_1 = require("@aws-sdk/util-base64-browser");
14
13
  const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
15
14
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
16
15
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
@@ -26,8 +25,6 @@ const getRuntimeConfig = (config) => {
26
25
  ...config,
27
26
  runtime: "browser",
28
27
  defaultsMode,
29
- base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
30
- base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
31
28
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
32
29
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
33
30
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -12,7 +12,6 @@ const hash_node_1 = require("@aws-sdk/hash-node");
12
12
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
13
13
  const node_config_provider_1 = require("@aws-sdk/node-config-provider");
14
14
  const node_http_handler_1 = require("@aws-sdk/node-http-handler");
15
- const util_base64_node_1 = require("@aws-sdk/util-base64-node");
16
15
  const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
17
16
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
18
17
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
@@ -30,8 +29,6 @@ const getRuntimeConfig = (config) => {
30
29
  ...config,
31
30
  runtime: "node",
32
31
  defaultsMode,
33
- base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
34
- base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
35
32
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
36
33
  credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
37
34
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -2,9 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const url_parser_1 = require("@aws-sdk/url-parser");
5
+ const util_base64_1 = require("@aws-sdk/util-base64");
5
6
  const endpointResolver_1 = require("./endpoint/endpointResolver");
6
7
  const getRuntimeConfig = (config) => ({
7
8
  apiVersion: "2017-10-26",
9
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
10
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
8
11
  disableHostPrefix: config?.disableHostPrefix ?? false,
9
12
  endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
13
  logger: config?.logger ?? {},
@@ -68,10 +68,12 @@ export var LanguageCode;
68
68
  LanguageCode["ES_US"] = "es-US";
69
69
  LanguageCode["FR_CA"] = "fr-CA";
70
70
  LanguageCode["FR_FR"] = "fr-FR";
71
+ LanguageCode["HI_IN"] = "hi-IN";
71
72
  LanguageCode["IT_IT"] = "it-IT";
72
73
  LanguageCode["JA_JP"] = "ja-JP";
73
74
  LanguageCode["KO_KR"] = "ko-KR";
74
75
  LanguageCode["PT_BR"] = "pt-BR";
76
+ LanguageCode["TH_TH"] = "th-TH";
75
77
  LanguageCode["ZH_CN"] = "zh-CN";
76
78
  })(LanguageCode || (LanguageCode = {}));
77
79
  export class LimitExceededException extends __BaseException {
@@ -6,7 +6,6 @@ import { streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { WebSocketHandler, eventStreamPayloadHandler } from "@aws-sdk/middleware-sdk-transcribe-streaming";
9
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
10
9
  import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
11
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
12
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
@@ -22,8 +21,6 @@ export const getRuntimeConfig = (config) => {
22
21
  ...config,
23
22
  runtime: "browser",
24
23
  defaultsMode,
25
- base64Decoder: config?.base64Decoder ?? fromBase64,
26
- base64Encoder: config?.base64Encoder ?? toBase64,
27
24
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
25
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
29
26
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -8,7 +8,6 @@ import { Hash } from "@aws-sdk/hash-node";
8
8
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
9
9
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
10
10
  import { NodeHttp2Handler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
11
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
12
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
13
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
14
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
@@ -26,8 +25,6 @@ export const getRuntimeConfig = (config) => {
26
25
  ...config,
27
26
  runtime: "node",
28
27
  defaultsMode,
29
- base64Decoder: config?.base64Decoder ?? fromBase64,
30
- base64Encoder: config?.base64Encoder ?? toBase64,
31
28
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
32
29
  credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
33
30
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -1,7 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
+ import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
2
3
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
3
4
  export const getRuntimeConfig = (config) => ({
4
5
  apiVersion: "2017-10-26",
6
+ base64Decoder: config?.base64Decoder ?? fromBase64,
7
+ base64Encoder: config?.base64Encoder ?? toBase64,
5
8
  disableHostPrefix: config?.disableHostPrefix ?? false,
6
9
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
7
10
  logger: config?.logger ?? {},
@@ -3,35 +3,54 @@ import { StartMedicalStreamTranscriptionCommandInput, StartMedicalStreamTranscri
3
3
  import { StartStreamTranscriptionCommandInput, StartStreamTranscriptionCommandOutput } from "./commands/StartStreamTranscriptionCommand";
4
4
  import { TranscribeStreamingClient } from "./TranscribeStreamingClient";
5
5
  /**
6
- * <p>Operations and objects for transcribing streaming speech to text.</p>
6
+ * <p>Amazon Transcribe streaming offers two types of real-time transcription:
7
+ * <b>Standard</b> and <b>Medical</b>.</p>
8
+ * <ul>
9
+ * <li>
10
+ * <p>
11
+ * <b>Standard transcriptions</b> are the most common option. Refer
12
+ * to for details.</p>
13
+ * </li>
14
+ * <li>
15
+ * <p>
16
+ * <b>Medical transcriptions</b> are tailored to medical professionals
17
+ * and incorporate medical terms. A common use case for this service is transcribing doctor-patient
18
+ * dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to
19
+ * for details.</p>
20
+ * </li>
21
+ * </ul>
7
22
  */
8
23
  export declare class TranscribeStreaming extends TranscribeStreamingClient {
9
24
  /**
10
- * <p>Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon Transcribe Medical and the
11
- * transcription results are streamed to your application.</p>
25
+ * <p>Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to
26
+ * Amazon Transcribe Medical and the transcription results are streamed to your
27
+ * application.</p>
28
+ * <p>For more information on streaming with Amazon Transcribe Medical, see
29
+ * <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing
30
+ * streaming audio</a>.</p>
12
31
  */
13
32
  startMedicalStreamTranscription(args: StartMedicalStreamTranscriptionCommandInput, options?: __HttpHandlerOptions): Promise<StartMedicalStreamTranscriptionCommandOutput>;
14
33
  startMedicalStreamTranscription(args: StartMedicalStreamTranscriptionCommandInput, cb: (err: any, data?: StartMedicalStreamTranscriptionCommandOutput) => void): void;
15
34
  startMedicalStreamTranscription(args: StartMedicalStreamTranscriptionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartMedicalStreamTranscriptionCommandOutput) => void): void;
16
35
  /**
17
- * <p>Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon Transcribe and the transcription
18
- * results are streamed to your application.</p>
19
- * <p>The following are encoded as HTTP/2 headers:</p>
36
+ * <p>Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to
37
+ * Amazon Transcribe and the transcription results are streamed to your application.</p>
38
+ * <p>The following are encoded as headers:</p>
20
39
  * <ul>
21
40
  * <li>
22
- * <p>x-amzn-transcribe-language-code</p>
41
+ * <p>language-code</p>
23
42
  * </li>
24
43
  * <li>
25
- * <p>x-amzn-transcribe-media-encoding</p>
44
+ * <p>media-encoding</p>
26
45
  * </li>
27
46
  * <li>
28
- * <p>x-amzn-transcribe-sample-rate</p>
47
+ * <p>sample-rate</p>
29
48
  * </li>
30
49
  * <li>
31
- * <p>x-amzn-transcribe-session-id</p>
50
+ * <p>session-id</p>
32
51
  * </li>
33
52
  * </ul>
34
- * <p>See the <a href="https://docs.aws.amazon.com/sdk-for-go/api/service/transcribestreamingservice/#TranscribeStreamingService.StartStreamTranscription"> SDK for Go API Reference</a> for more detail.</p>
53
+ * <p>For more information on streaming with Amazon Transcribe, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
35
54
  */
36
55
  startStreamTranscription(args: StartStreamTranscriptionCommandInput, options?: __HttpHandlerOptions): Promise<StartStreamTranscriptionCommandOutput>;
37
56
  startStreamTranscription(args: StartStreamTranscriptionCommandInput, cb: (err: any, data?: StartStreamTranscriptionCommandOutput) => void): void;
@@ -137,7 +137,22 @@ declare type TranscribeStreamingClientResolvedConfigType = __SmithyResolvedConfi
137
137
  export interface TranscribeStreamingClientResolvedConfig extends TranscribeStreamingClientResolvedConfigType {
138
138
  }
139
139
  /**
140
- * <p>Operations and objects for transcribing streaming speech to text.</p>
140
+ * <p>Amazon Transcribe streaming offers two types of real-time transcription:
141
+ * <b>Standard</b> and <b>Medical</b>.</p>
142
+ * <ul>
143
+ * <li>
144
+ * <p>
145
+ * <b>Standard transcriptions</b> are the most common option. Refer
146
+ * to for details.</p>
147
+ * </li>
148
+ * <li>
149
+ * <p>
150
+ * <b>Medical transcriptions</b> are tailored to medical professionals
151
+ * and incorporate medical terms. A common use case for this service is transcribing doctor-patient
152
+ * dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to
153
+ * for details.</p>
154
+ * </li>
155
+ * </ul>
141
156
  */
142
157
  export declare class TranscribeStreamingClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, TranscribeStreamingClientResolvedConfig> {
143
158
  /**
@@ -8,8 +8,12 @@ export interface StartMedicalStreamTranscriptionCommandInput extends StartMedica
8
8
  export interface StartMedicalStreamTranscriptionCommandOutput extends StartMedicalStreamTranscriptionResponse, __MetadataBearer {
9
9
  }
10
10
  /**
11
- * <p>Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon Transcribe Medical and the
12
- * transcription results are streamed to your application.</p>
11
+ * <p>Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to
12
+ * Amazon Transcribe Medical and the transcription results are streamed to your
13
+ * application.</p>
14
+ * <p>For more information on streaming with Amazon Transcribe Medical, see
15
+ * <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing
16
+ * streaming audio</a>.</p>
13
17
  * @example
14
18
  * Use a bare-bones client and the command you need to make an API call.
15
19
  * ```javascript
@@ -8,24 +8,24 @@ export interface StartStreamTranscriptionCommandInput extends StartStreamTranscr
8
8
  export interface StartStreamTranscriptionCommandOutput extends StartStreamTranscriptionResponse, __MetadataBearer {
9
9
  }
10
10
  /**
11
- * <p>Starts a bidirectional HTTP/2 stream where audio is streamed to Amazon Transcribe and the transcription
12
- * results are streamed to your application.</p>
13
- * <p>The following are encoded as HTTP/2 headers:</p>
11
+ * <p>Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to
12
+ * Amazon Transcribe and the transcription results are streamed to your application.</p>
13
+ * <p>The following are encoded as headers:</p>
14
14
  * <ul>
15
15
  * <li>
16
- * <p>x-amzn-transcribe-language-code</p>
16
+ * <p>language-code</p>
17
17
  * </li>
18
18
  * <li>
19
- * <p>x-amzn-transcribe-media-encoding</p>
19
+ * <p>media-encoding</p>
20
20
  * </li>
21
21
  * <li>
22
- * <p>x-amzn-transcribe-sample-rate</p>
22
+ * <p>sample-rate</p>
23
23
  * </li>
24
24
  * <li>
25
- * <p>x-amzn-transcribe-session-id</p>
25
+ * <p>session-id</p>
26
26
  * </li>
27
27
  * </ul>
28
- * <p>See the <a href="https://docs.aws.amazon.com/sdk-for-go/api/service/transcribestreamingservice/#TranscribeStreamingService.StartStreamTranscription"> SDK for Go API Reference</a> for more detail.</p>
28
+ * <p>For more information on streaming with Amazon Transcribe, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html">Transcribing streaming audio</a>.</p>
29
29
  * @example
30
30
  * Use a bare-bones client and the command you need to make an API call.
31
31
  * ```javascript