@aws-sdk/client-transcribe-streaming 3.29.0 → 3.33.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.
- package/CHANGELOG.md +35 -0
- package/TranscribeStreaming.ts +3 -2
- package/commands/StartStreamTranscriptionCommand.ts +3 -2
- package/dist/cjs/TranscribeStreaming.js.map +1 -1
- package/dist/cjs/TranscribeStreamingClient.js +17 -17
- package/dist/cjs/TranscribeStreamingClient.js.map +1 -1
- package/dist/cjs/commands/StartMedicalStreamTranscriptionCommand.js +4 -4
- package/dist/cjs/commands/StartMedicalStreamTranscriptionCommand.js.map +1 -1
- package/dist/cjs/commands/StartStreamTranscriptionCommand.js +7 -6
- package/dist/cjs/commands/StartStreamTranscriptionCommand.js.map +1 -1
- package/dist/cjs/endpoints.js +23 -2
- package/dist/cjs/endpoints.js.map +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models/index.js +1 -1
- package/dist/cjs/models/index.js.map +1 -1
- package/dist/cjs/models/models_0.js +18 -1
- package/dist/cjs/models/models_0.js.map +1 -1
- package/dist/cjs/package.json +37 -37
- package/dist/cjs/protocols/Aws_restJson1.js +94 -50
- package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
- package/dist/cjs/runtimeConfig.browser.js +4 -4
- package/dist/cjs/runtimeConfig.browser.js.map +1 -1
- package/dist/cjs/runtimeConfig.js +8 -8
- package/dist/cjs/runtimeConfig.js.map +1 -1
- package/dist/cjs/runtimeConfig.native.js +1 -1
- package/dist/cjs/runtimeConfig.native.js.map +1 -1
- package/dist/cjs/test/index.integ.spec.js +1 -1
- package/dist/cjs/test/index.integ.spec.js.map +1 -1
- package/dist/es/TranscribeStreaming.js.map +1 -1
- package/dist/es/commands/StartStreamTranscriptionCommand.js +3 -2
- package/dist/es/commands/StartStreamTranscriptionCommand.js.map +1 -1
- package/dist/es/endpoints.js +22 -1
- package/dist/es/endpoints.js.map +1 -1
- package/dist/es/models/models_0.js +15 -0
- package/dist/es/models/models_0.js.map +1 -1
- package/dist/es/package.json +37 -37
- package/dist/es/protocols/Aws_restJson1.js +42 -1
- package/dist/es/protocols/Aws_restJson1.js.map +1 -1
- package/dist/types/TranscribeStreaming.d.ts +3 -2
- package/dist/types/commands/StartStreamTranscriptionCommand.d.ts +3 -2
- package/dist/types/models/models_0.d.ts +98 -17
- package/dist/types/ts3.4/TranscribeStreaming.d.ts +3 -2
- package/dist/types/ts3.4/commands/StartStreamTranscriptionCommand.d.ts +3 -2
- package/dist/types/ts3.4/models/models_0.d.ts +98 -17
- package/endpoints.ts +22 -1
- package/models/models_0.ts +116 -17
- package/package.json +37 -37
- package/protocols/Aws_restJson1.ts +48 -0
- package/tsconfig.json +1 -2
package/models/models_0.ts
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* <p>The entity identified as personally identifiable information (PII).</p>
|
|
5
|
+
*/
|
|
6
|
+
export interface Entity {
|
|
7
|
+
/**
|
|
8
|
+
* <p>The start time of speech that was identified as PII.</p>
|
|
9
|
+
*/
|
|
10
|
+
StartTime?: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* <p>The end time of speech that was identified as PII.</p>
|
|
14
|
+
*/
|
|
15
|
+
EndTime?: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* <p>The category of of information identified in this entity; for example, PII.</p>
|
|
19
|
+
*/
|
|
20
|
+
Category?: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* <p>The type of PII identified in this entity; for example, name or credit card number.</p>
|
|
24
|
+
*/
|
|
25
|
+
Type?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* <p>The words in the transcription output that have been identified as a PII entity.</p>
|
|
29
|
+
*/
|
|
30
|
+
Content?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* <p>A value between zero and one that Amazon Transcribe assigns to PII identified in the source audio. Larger values indicate a higher confidence in PII identification.</p>
|
|
34
|
+
*/
|
|
35
|
+
Confidence?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export namespace Entity {
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export const filterSensitiveLog = (obj: Entity): any => ({
|
|
43
|
+
...obj,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
3
47
|
export enum ItemType {
|
|
4
48
|
PRONUNCIATION = "pronunciation",
|
|
5
49
|
PUNCTUATION = "punctuation",
|
|
@@ -81,6 +125,11 @@ export interface Alternative {
|
|
|
81
125
|
* <p>One or more alternative interpretations of the input audio. </p>
|
|
82
126
|
*/
|
|
83
127
|
Items?: Item[];
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* <p>Contains the entities identified as personally identifiable information (PII) in the transcription output.</p>
|
|
131
|
+
*/
|
|
132
|
+
Entities?: Entity[];
|
|
84
133
|
}
|
|
85
134
|
|
|
86
135
|
export namespace Alternative {
|
|
@@ -94,8 +143,10 @@ export namespace Alternative {
|
|
|
94
143
|
|
|
95
144
|
/**
|
|
96
145
|
* <p>Provides a wrapper for the audio chunks that you are sending.</p>
|
|
97
|
-
* <p>For information on audio encoding in Amazon Transcribe, see
|
|
98
|
-
*
|
|
146
|
+
* <p>For information on audio encoding in Amazon Transcribe, see
|
|
147
|
+
* <a href="https://docs.aws.amazon.com/transcribe/latest/dg/input.html">Speech input</a>. For information
|
|
148
|
+
* on audio encoding formats in Amazon Transcribe Medical, see
|
|
149
|
+
* <a href="https://docs.aws.amazon.com/transcribe/latest/dg/input-med.html">Speech input</a>.</p>
|
|
99
150
|
*/
|
|
100
151
|
export interface AudioEvent {
|
|
101
152
|
/**
|
|
@@ -123,10 +174,10 @@ export namespace AudioStream {
|
|
|
123
174
|
/**
|
|
124
175
|
* <p>A blob of audio from your application. You audio stream consists of one or more audio
|
|
125
176
|
* events.</p>
|
|
126
|
-
* <p>For information on audio encoding formats in Amazon Transcribe, see <a>input</a>. For
|
|
127
|
-
* information on audio encoding formats in Amazon Transcribe Medical, see <a
|
|
128
|
-
* <p>For more information on stream encoding in Amazon Transcribe, see <a
|
|
129
|
-
* information on stream encoding in Amazon Transcribe Medical, see <a
|
|
177
|
+
* <p>For information on audio encoding formats in Amazon Transcribe, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/input.html">Speech input</a>. For
|
|
178
|
+
* information on audio encoding formats in Amazon Transcribe Medical, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/input-med.html">Speech input</a>.</p>
|
|
179
|
+
* <p>For more information on stream encoding in Amazon Transcribe, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/event-stream.html">Event stream encoding</a>. For
|
|
180
|
+
* information on stream encoding in Amazon Transcribe Medical, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/event-stream-med.html">Event stream encoding</a>.</p>
|
|
130
181
|
*/
|
|
131
182
|
export interface AudioEventMember {
|
|
132
183
|
AudioEvent: AudioEvent;
|
|
@@ -197,6 +248,14 @@ export namespace ConflictException {
|
|
|
197
248
|
});
|
|
198
249
|
}
|
|
199
250
|
|
|
251
|
+
export enum ContentIdentificationType {
|
|
252
|
+
PII = "PII",
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export enum ContentRedactionType {
|
|
256
|
+
PII = "PII",
|
|
257
|
+
}
|
|
258
|
+
|
|
200
259
|
/**
|
|
201
260
|
* <p>A problem occurred while processing the audio. Amazon Transcribe or Amazon Transcribe Medical terminated processing. Try
|
|
202
261
|
* your request again.</p>
|
|
@@ -742,8 +801,7 @@ export interface StartMedicalStreamTranscriptionRequest {
|
|
|
742
801
|
LanguageCode: LanguageCode | string | undefined;
|
|
743
802
|
|
|
744
803
|
/**
|
|
745
|
-
* <p>The sample rate of the input audio in Hertz
|
|
746
|
-
* accepted.</p>
|
|
804
|
+
* <p>The sample rate of the input audio in Hertz.</p>
|
|
747
805
|
*/
|
|
748
806
|
MediaSampleRateHertz: number | undefined;
|
|
749
807
|
|
|
@@ -833,7 +891,7 @@ export interface StartMedicalStreamTranscriptionResponse {
|
|
|
833
891
|
LanguageCode?: LanguageCode | string;
|
|
834
892
|
|
|
835
893
|
/**
|
|
836
|
-
* <p>The sample rate of the input audio in Hertz
|
|
894
|
+
* <p>The sample rate of the input audio in Hertz.</p>
|
|
837
895
|
*/
|
|
838
896
|
MediaSampleRateHertz?: number;
|
|
839
897
|
|
|
@@ -913,8 +971,8 @@ export interface StartStreamTranscriptionRequest {
|
|
|
913
971
|
LanguageCode: LanguageCode | string | undefined;
|
|
914
972
|
|
|
915
973
|
/**
|
|
916
|
-
* <p>The sample rate, in Hertz, of the input audio. We suggest that you use
|
|
917
|
-
* quality audio and
|
|
974
|
+
* <p>The sample rate, in Hertz, of the input audio. We suggest that you use 8,000 Hz for low
|
|
975
|
+
* quality audio and 16,000 Hz for high quality audio.</p>
|
|
918
976
|
*/
|
|
919
977
|
MediaSampleRateHertz: number | undefined;
|
|
920
978
|
|
|
@@ -936,13 +994,13 @@ export interface StartStreamTranscriptionRequest {
|
|
|
936
994
|
SessionId?: string;
|
|
937
995
|
|
|
938
996
|
/**
|
|
939
|
-
* <p>PCM-encoded stream of audio blobs. The audio stream is encoded as an
|
|
997
|
+
* <p>PCM-encoded stream of audio blobs. The audio stream is encoded as an HTTP/2 data
|
|
940
998
|
* frame.</p>
|
|
941
999
|
*/
|
|
942
1000
|
AudioStream: AsyncIterable<AudioStream> | undefined;
|
|
943
1001
|
|
|
944
1002
|
/**
|
|
945
|
-
* <p>The name of the vocabulary filter you've created that is unique to your
|
|
1003
|
+
* <p>The name of the vocabulary filter you've created that is unique to your account.
|
|
946
1004
|
* Provide the name in this field to successfully use it in a stream.</p>
|
|
947
1005
|
*/
|
|
948
1006
|
VocabularyFilterName?: string;
|
|
@@ -950,7 +1008,7 @@ export interface StartStreamTranscriptionRequest {
|
|
|
950
1008
|
/**
|
|
951
1009
|
* <p>The manner in which you use your vocabulary filter to filter words in your transcript.
|
|
952
1010
|
* <code>Remove</code> removes filtered words from your transcription results.
|
|
953
|
-
* <code>Mask</code> masks
|
|
1011
|
+
* <code>Mask</code> masks filtered words with a <code>***</code> in your transcription results.
|
|
954
1012
|
* <code>Tag</code> keeps the filtered words in your transcription results and tags them. The
|
|
955
1013
|
* tag appears as <code>VocabularyFilterMatch</code> equal to <code>True</code>
|
|
956
1014
|
* </p>
|
|
@@ -992,6 +1050,33 @@ export interface StartStreamTranscriptionRequest {
|
|
|
992
1050
|
* stability levels can come with lower overall transcription accuracy.</p>
|
|
993
1051
|
*/
|
|
994
1052
|
PartialResultsStability?: PartialResultsStability | string;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* <p>Set this field to PII to identify personally identifiable information (PII) in the transcription output. Content identification is performed only upon complete transcription of the audio segments.</p>
|
|
1056
|
+
* <p>You can’t set both <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
|
|
1057
|
+
*/
|
|
1058
|
+
ContentIdentificationType?: ContentIdentificationType | string;
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* <p>Set this field to PII to redact personally identifiable information (PII) in the transcription output. Content redaction is performed only upon complete transcription of the audio segments.</p>
|
|
1062
|
+
* <p>You can’t set both <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
|
|
1063
|
+
*/
|
|
1064
|
+
ContentRedactionType?: ContentRedactionType | string;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* <p>List the PII entity types you want to identify or redact. In order to specify entity types, you must have
|
|
1068
|
+
* either <code>ContentIdentificationType</code> or <code>ContentRedactionType</code> enabled.</p>
|
|
1069
|
+
* <p>
|
|
1070
|
+
* <code>PIIEntityTypes</code> must be comma-separated; the available values are:
|
|
1071
|
+
* <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>,
|
|
1072
|
+
* <code>CREDIT_DEBIT_NUMBER</code>, <code>CREDIT_DEBIT_CVV</code>,
|
|
1073
|
+
* <code>CREDIT_DEBIT_EXPIRY</code>, <code>PIN</code>, <code>EMAIL</code>,
|
|
1074
|
+
* <code>ADDRESS</code>, <code>NAME</code>, <code>PHONE</code>,
|
|
1075
|
+
* <code>SSN</code>, and <code>ALL</code>.</p>
|
|
1076
|
+
* <p>
|
|
1077
|
+
* <code>PiiEntityTypes</code> is an optional parameter with a default value of <code>ALL</code>.</p>
|
|
1078
|
+
*/
|
|
1079
|
+
PiiEntityTypes?: string;
|
|
995
1080
|
}
|
|
996
1081
|
|
|
997
1082
|
export namespace StartStreamTranscriptionRequest {
|
|
@@ -1062,8 +1147,7 @@ export namespace TranscriptResultStream {
|
|
|
1062
1147
|
/**
|
|
1063
1148
|
* <p>A portion of the transcription of the audio stream. Events are sent periodically from
|
|
1064
1149
|
* Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio
|
|
1065
|
-
* stream, or it can be the entire transcription of that portion of the audio stream.
|
|
1066
|
-
* </p>
|
|
1150
|
+
* stream, or it can be the entire transcription of that portion of the audio stream. </p>
|
|
1067
1151
|
*/
|
|
1068
1152
|
export interface TranscriptEventMember {
|
|
1069
1153
|
TranscriptEvent: TranscriptEvent;
|
|
@@ -1209,7 +1293,7 @@ export interface StartStreamTranscriptionResponse {
|
|
|
1209
1293
|
LanguageCode?: LanguageCode | string;
|
|
1210
1294
|
|
|
1211
1295
|
/**
|
|
1212
|
-
* <p>The sample rate for the input audio stream. Use
|
|
1296
|
+
* <p>The sample rate for the input audio stream. Use 8,000 Hz for low quality audio and 16,000 Hz
|
|
1213
1297
|
* for high quality audio.</p>
|
|
1214
1298
|
*/
|
|
1215
1299
|
MediaSampleRateHertz?: number;
|
|
@@ -1269,6 +1353,21 @@ export interface StartStreamTranscriptionResponse {
|
|
|
1269
1353
|
* level.</p>
|
|
1270
1354
|
*/
|
|
1271
1355
|
PartialResultsStability?: PartialResultsStability | string;
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* <p>Shows whether content identification was enabled in this stream.</p>
|
|
1359
|
+
*/
|
|
1360
|
+
ContentIdentificationType?: ContentIdentificationType | string;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* <p>Shows whether content redaction was enabled in this stream.</p>
|
|
1364
|
+
*/
|
|
1365
|
+
ContentRedactionType?: ContentRedactionType | string;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* <p>Lists the PII entity types you specified in your request.</p>
|
|
1369
|
+
*/
|
|
1370
|
+
PiiEntityTypes?: string;
|
|
1272
1371
|
}
|
|
1273
1372
|
|
|
1274
1373
|
export namespace StartStreamTranscriptionResponse {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-transcribe-streaming",
|
|
3
3
|
"description": "AWS SDK for JavaScript Transcribe Streaming Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.33.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "yarn remove-definitions && yarn remove-dist && yarn remove-documentation",
|
|
7
7
|
"build-documentation": "yarn remove-documentation && typedoc ./",
|
|
@@ -30,51 +30,51 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@aws-crypto/sha256-browser": "^1.0.0",
|
|
32
32
|
"@aws-crypto/sha256-js": "^1.0.0",
|
|
33
|
-
"@aws-sdk/client-sts": "3.
|
|
34
|
-
"@aws-sdk/config-resolver": "3.
|
|
35
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
36
|
-
"@aws-sdk/eventstream-handler-node": "3.
|
|
37
|
-
"@aws-sdk/eventstream-serde-browser": "3.
|
|
38
|
-
"@aws-sdk/eventstream-serde-config-resolver": "3.
|
|
39
|
-
"@aws-sdk/eventstream-serde-node": "3.
|
|
40
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
41
|
-
"@aws-sdk/hash-node": "3.
|
|
42
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
43
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
44
|
-
"@aws-sdk/middleware-eventstream": "3.
|
|
45
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
46
|
-
"@aws-sdk/middleware-logger": "3.
|
|
47
|
-
"@aws-sdk/middleware-retry": "3.
|
|
48
|
-
"@aws-sdk/middleware-sdk-transcribe-streaming": "3.
|
|
49
|
-
"@aws-sdk/middleware-serde": "3.
|
|
50
|
-
"@aws-sdk/middleware-signing": "3.
|
|
51
|
-
"@aws-sdk/middleware-stack": "3.
|
|
52
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
53
|
-
"@aws-sdk/node-config-provider": "3.
|
|
54
|
-
"@aws-sdk/node-http-handler": "3.
|
|
55
|
-
"@aws-sdk/protocol-http": "3.
|
|
56
|
-
"@aws-sdk/smithy-client": "3.
|
|
57
|
-
"@aws-sdk/types": "3.
|
|
58
|
-
"@aws-sdk/url-parser": "3.
|
|
59
|
-
"@aws-sdk/util-base64-browser": "3.
|
|
60
|
-
"@aws-sdk/util-base64-node": "3.
|
|
61
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
62
|
-
"@aws-sdk/util-body-length-node": "3.
|
|
63
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
64
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
65
|
-
"@aws-sdk/util-utf8-browser": "3.
|
|
66
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
33
|
+
"@aws-sdk/client-sts": "3.33.0",
|
|
34
|
+
"@aws-sdk/config-resolver": "3.33.0",
|
|
35
|
+
"@aws-sdk/credential-provider-node": "3.33.0",
|
|
36
|
+
"@aws-sdk/eventstream-handler-node": "3.32.0",
|
|
37
|
+
"@aws-sdk/eventstream-serde-browser": "3.32.0",
|
|
38
|
+
"@aws-sdk/eventstream-serde-config-resolver": "3.32.0",
|
|
39
|
+
"@aws-sdk/eventstream-serde-node": "3.32.0",
|
|
40
|
+
"@aws-sdk/fetch-http-handler": "3.32.0",
|
|
41
|
+
"@aws-sdk/hash-node": "3.32.0",
|
|
42
|
+
"@aws-sdk/invalid-dependency": "3.32.0",
|
|
43
|
+
"@aws-sdk/middleware-content-length": "3.32.0",
|
|
44
|
+
"@aws-sdk/middleware-eventstream": "3.32.0",
|
|
45
|
+
"@aws-sdk/middleware-host-header": "3.32.0",
|
|
46
|
+
"@aws-sdk/middleware-logger": "3.32.0",
|
|
47
|
+
"@aws-sdk/middleware-retry": "3.32.0",
|
|
48
|
+
"@aws-sdk/middleware-sdk-transcribe-streaming": "3.33.0",
|
|
49
|
+
"@aws-sdk/middleware-serde": "3.32.0",
|
|
50
|
+
"@aws-sdk/middleware-signing": "3.33.0",
|
|
51
|
+
"@aws-sdk/middleware-stack": "3.32.0",
|
|
52
|
+
"@aws-sdk/middleware-user-agent": "3.32.0",
|
|
53
|
+
"@aws-sdk/node-config-provider": "3.32.0",
|
|
54
|
+
"@aws-sdk/node-http-handler": "3.32.0",
|
|
55
|
+
"@aws-sdk/protocol-http": "3.32.0",
|
|
56
|
+
"@aws-sdk/smithy-client": "3.32.0",
|
|
57
|
+
"@aws-sdk/types": "3.32.0",
|
|
58
|
+
"@aws-sdk/url-parser": "3.32.0",
|
|
59
|
+
"@aws-sdk/util-base64-browser": "3.32.0",
|
|
60
|
+
"@aws-sdk/util-base64-node": "3.32.0",
|
|
61
|
+
"@aws-sdk/util-body-length-browser": "3.32.0",
|
|
62
|
+
"@aws-sdk/util-body-length-node": "3.32.0",
|
|
63
|
+
"@aws-sdk/util-user-agent-browser": "3.32.0",
|
|
64
|
+
"@aws-sdk/util-user-agent-node": "3.33.0",
|
|
65
|
+
"@aws-sdk/util-utf8-browser": "3.32.0",
|
|
66
|
+
"@aws-sdk/util-utf8-node": "3.32.0",
|
|
67
67
|
"tslib": "^2.3.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@aws-sdk/client-documentation-generator": "3.
|
|
70
|
+
"@aws-sdk/client-documentation-generator": "3.32.0",
|
|
71
71
|
"@types/node": "^12.7.5",
|
|
72
72
|
"downlevel-dts": "0.7.0",
|
|
73
73
|
"jest": "^26.1.0",
|
|
74
74
|
"rimraf": "^3.0.0",
|
|
75
75
|
"ts-jest": "^26.4.1",
|
|
76
76
|
"typedoc": "^0.19.2",
|
|
77
|
-
"typescript": "~4.
|
|
77
|
+
"typescript": "~4.3.5"
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">=10.0.0"
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
AudioStream,
|
|
13
13
|
BadRequestException,
|
|
14
14
|
ConflictException,
|
|
15
|
+
Entity,
|
|
15
16
|
InternalFailureException,
|
|
16
17
|
Item,
|
|
17
18
|
LimitExceededException,
|
|
@@ -131,6 +132,15 @@ export const serializeAws_restJson1StartStreamTranscriptionCommand = async (
|
|
|
131
132
|
...(isSerializableHeaderValue(input.PartialResultsStability) && {
|
|
132
133
|
"x-amzn-transcribe-partial-results-stability": input.PartialResultsStability!,
|
|
133
134
|
}),
|
|
135
|
+
...(isSerializableHeaderValue(input.ContentIdentificationType) && {
|
|
136
|
+
"x-amzn-transcribe-content-identification-type": input.ContentIdentificationType!,
|
|
137
|
+
}),
|
|
138
|
+
...(isSerializableHeaderValue(input.ContentRedactionType) && {
|
|
139
|
+
"x-amzn-transcribe-content-redaction-type": input.ContentRedactionType!,
|
|
140
|
+
}),
|
|
141
|
+
...(isSerializableHeaderValue(input.PiiEntityTypes) && {
|
|
142
|
+
"x-amzn-transcribe-pii-entity-types": input.PiiEntityTypes!,
|
|
143
|
+
}),
|
|
134
144
|
};
|
|
135
145
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stream-transcription";
|
|
136
146
|
let body: any;
|
|
@@ -308,6 +318,8 @@ export const deserializeAws_restJson1StartStreamTranscriptionCommand = async (
|
|
|
308
318
|
}
|
|
309
319
|
const contents: StartStreamTranscriptionCommandOutput = {
|
|
310
320
|
$metadata: deserializeMetadata(output),
|
|
321
|
+
ContentIdentificationType: undefined,
|
|
322
|
+
ContentRedactionType: undefined,
|
|
311
323
|
EnableChannelIdentification: undefined,
|
|
312
324
|
EnablePartialResultsStabilization: undefined,
|
|
313
325
|
LanguageCode: undefined,
|
|
@@ -315,6 +327,7 @@ export const deserializeAws_restJson1StartStreamTranscriptionCommand = async (
|
|
|
315
327
|
MediaSampleRateHertz: undefined,
|
|
316
328
|
NumberOfChannels: undefined,
|
|
317
329
|
PartialResultsStability: undefined,
|
|
330
|
+
PiiEntityTypes: undefined,
|
|
318
331
|
RequestId: undefined,
|
|
319
332
|
SessionId: undefined,
|
|
320
333
|
ShowSpeakerLabel: undefined,
|
|
@@ -366,6 +379,15 @@ export const deserializeAws_restJson1StartStreamTranscriptionCommand = async (
|
|
|
366
379
|
if (output.headers["x-amzn-transcribe-partial-results-stability"] !== undefined) {
|
|
367
380
|
contents.PartialResultsStability = output.headers["x-amzn-transcribe-partial-results-stability"];
|
|
368
381
|
}
|
|
382
|
+
if (output.headers["x-amzn-transcribe-content-identification-type"] !== undefined) {
|
|
383
|
+
contents.ContentIdentificationType = output.headers["x-amzn-transcribe-content-identification-type"];
|
|
384
|
+
}
|
|
385
|
+
if (output.headers["x-amzn-transcribe-content-redaction-type"] !== undefined) {
|
|
386
|
+
contents.ContentRedactionType = output.headers["x-amzn-transcribe-content-redaction-type"];
|
|
387
|
+
}
|
|
388
|
+
if (output.headers["x-amzn-transcribe-pii-entity-types"] !== undefined) {
|
|
389
|
+
contents.PiiEntityTypes = output.headers["x-amzn-transcribe-pii-entity-types"];
|
|
390
|
+
}
|
|
369
391
|
const data: any = context.eventStreamMarshaller.deserialize(output.body, async (event) => {
|
|
370
392
|
const eventName = Object.keys(event)[0];
|
|
371
393
|
const eventHeaders = Object.entries(event[eventName].headers).reduce((accummulator, curr) => {
|
|
@@ -742,6 +764,10 @@ const serializeAws_restJson1AudioStream = (input: AudioStream, context: __SerdeC
|
|
|
742
764
|
|
|
743
765
|
const deserializeAws_restJson1Alternative = (output: any, context: __SerdeContext): Alternative => {
|
|
744
766
|
return {
|
|
767
|
+
Entities:
|
|
768
|
+
output.Entities !== undefined && output.Entities !== null
|
|
769
|
+
? deserializeAws_restJson1EntityList(output.Entities, context)
|
|
770
|
+
: undefined,
|
|
745
771
|
Items:
|
|
746
772
|
output.Items !== undefined && output.Items !== null
|
|
747
773
|
? deserializeAws_restJson1ItemList(output.Items, context)
|
|
@@ -773,6 +799,28 @@ const deserializeAws_restJson1ConflictException = (output: any, context: __Serde
|
|
|
773
799
|
} as any;
|
|
774
800
|
};
|
|
775
801
|
|
|
802
|
+
const deserializeAws_restJson1Entity = (output: any, context: __SerdeContext): Entity => {
|
|
803
|
+
return {
|
|
804
|
+
Category: __expectString(output.Category),
|
|
805
|
+
Confidence: __limitedParseDouble(output.Confidence),
|
|
806
|
+
Content: __expectString(output.Content),
|
|
807
|
+
EndTime: __limitedParseDouble(output.EndTime),
|
|
808
|
+
StartTime: __limitedParseDouble(output.StartTime),
|
|
809
|
+
Type: __expectString(output.Type),
|
|
810
|
+
} as any;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
const deserializeAws_restJson1EntityList = (output: any, context: __SerdeContext): Entity[] => {
|
|
814
|
+
return (output || [])
|
|
815
|
+
.filter((e: any) => e != null)
|
|
816
|
+
.map((entry: any) => {
|
|
817
|
+
if (entry === null) {
|
|
818
|
+
return null as any;
|
|
819
|
+
}
|
|
820
|
+
return deserializeAws_restJson1Entity(entry, context);
|
|
821
|
+
});
|
|
822
|
+
};
|
|
823
|
+
|
|
776
824
|
const deserializeAws_restJson1InternalFailureException = (
|
|
777
825
|
output: any,
|
|
778
826
|
context: __SerdeContext
|
package/tsconfig.json
CHANGED
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"resolveJsonModule": true,
|
|
14
14
|
"esModuleInterop": true,
|
|
15
15
|
"declarationDir": "./dist/types",
|
|
16
|
-
"outDir": "dist/cjs"
|
|
17
|
-
"useUnknownInCatchVariables": false
|
|
16
|
+
"outDir": "dist/cjs"
|
|
18
17
|
},
|
|
19
18
|
"typedocOptions": {
|
|
20
19
|
"exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"],
|