@aws-sdk/client-transcribe-streaming 3.42.0 → 3.43.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 CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
7
+
8
+
9
+ ### Features
10
+
11
+ * **clients:** update clients as of 11/28/2021 ([#3072](https://github.com/aws/aws-sdk-js-v3/issues/3072)) ([2ad1622](https://github.com/aws/aws-sdk-js-v3/commit/2ad1622ba8586b926fe508055211803bb29e3976))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-transcribe-streaming
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartStreamTranscriptionResponse = exports.TranscriptResultStream = exports.TranscriptEvent = exports.Transcript = exports.StartStreamTranscriptionRequest = exports.VocabularyFilterMethod = exports.StartMedicalStreamTranscriptionResponse = exports.StartMedicalStreamTranscriptionRequest = exports.Type = exports.Specialty = exports.Result = exports.PartialResultsStability = exports.MedicalTranscriptResultStream = exports.ServiceUnavailableException = exports.MedicalTranscriptEvent = exports.MedicalTranscript = exports.MedicalResult = exports.MedicalContentIdentificationType = exports.MedicalAlternative = exports.MedicalItem = exports.MedicalEntity = exports.MediaEncoding = exports.LimitExceededException = exports.LanguageCode = exports.InternalFailureException = exports.ContentRedactionType = exports.ContentIdentificationType = exports.ConflictException = exports.BadRequestException = exports.AudioStream = exports.AudioEvent = exports.Alternative = exports.Item = exports.ItemType = exports.Entity = void 0;
3
+ exports.StartStreamTranscriptionResponse = exports.TranscriptResultStream = exports.TranscriptEvent = exports.Transcript = exports.StartStreamTranscriptionRequest = exports.VocabularyFilterMethod = exports.StartMedicalStreamTranscriptionResponse = exports.StartMedicalStreamTranscriptionRequest = exports.Type = exports.Specialty = exports.Result = exports.PartialResultsStability = exports.MedicalTranscriptResultStream = exports.ServiceUnavailableException = exports.MedicalTranscriptEvent = exports.MedicalTranscript = exports.MedicalResult = exports.MedicalContentIdentificationType = exports.MedicalAlternative = exports.MedicalItem = exports.MedicalEntity = exports.MediaEncoding = exports.LimitExceededException = exports.LanguageWithScore = exports.LanguageCode = exports.InternalFailureException = exports.ContentRedactionType = exports.ContentIdentificationType = exports.ConflictException = exports.BadRequestException = exports.AudioStream = exports.AudioEvent = exports.Alternative = exports.Item = exports.ItemType = exports.Entity = void 0;
4
4
  var Entity;
5
5
  (function (Entity) {
6
6
  Entity.filterSensitiveLog = (obj) => ({
@@ -85,6 +85,12 @@ var LanguageCode;
85
85
  LanguageCode["PT_BR"] = "pt-BR";
86
86
  LanguageCode["ZH_CN"] = "zh-CN";
87
87
  })(LanguageCode = exports.LanguageCode || (exports.LanguageCode = {}));
88
+ var LanguageWithScore;
89
+ (function (LanguageWithScore) {
90
+ LanguageWithScore.filterSensitiveLog = (obj) => ({
91
+ ...obj,
92
+ });
93
+ })(LanguageWithScore = exports.LanguageWithScore || (exports.LanguageWithScore = {}));
88
94
  var LimitExceededException;
89
95
  (function (LimitExceededException) {
90
96
  LimitExceededException.filterSensitiveLog = (obj) => ({
@@ -92,6 +92,15 @@ const serializeAws_restJson1StartStreamTranscriptionCommand = async (input, cont
92
92
  ...(isSerializableHeaderValue(input.LanguageModelName) && {
93
93
  "x-amzn-transcribe-language-model-name": input.LanguageModelName,
94
94
  }),
95
+ ...(isSerializableHeaderValue(input.IdentifyLanguage) && {
96
+ "x-amzn-transcribe-identify-language": input.IdentifyLanguage.toString(),
97
+ }),
98
+ ...(isSerializableHeaderValue(input.LanguageOptions) && {
99
+ "x-amzn-transcribe-language-options": input.LanguageOptions,
100
+ }),
101
+ ...(isSerializableHeaderValue(input.PreferredLanguage) && {
102
+ "x-amzn-transcribe-preferred-language": input.PreferredLanguage,
103
+ }),
95
104
  };
96
105
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/stream-transcription";
97
106
  let body;
@@ -259,13 +268,16 @@ const deserializeAws_restJson1StartStreamTranscriptionCommand = async (output, c
259
268
  ContentRedactionType: undefined,
260
269
  EnableChannelIdentification: undefined,
261
270
  EnablePartialResultsStabilization: undefined,
271
+ IdentifyLanguage: undefined,
262
272
  LanguageCode: undefined,
263
273
  LanguageModelName: undefined,
274
+ LanguageOptions: undefined,
264
275
  MediaEncoding: undefined,
265
276
  MediaSampleRateHertz: undefined,
266
277
  NumberOfChannels: undefined,
267
278
  PartialResultsStability: undefined,
268
279
  PiiEntityTypes: undefined,
280
+ PreferredLanguage: undefined,
269
281
  RequestId: undefined,
270
282
  SessionId: undefined,
271
283
  ShowSpeakerLabel: undefined,
@@ -325,6 +337,15 @@ const deserializeAws_restJson1StartStreamTranscriptionCommand = async (output, c
325
337
  if (output.headers["x-amzn-transcribe-language-model-name"] !== undefined) {
326
338
  contents.LanguageModelName = output.headers["x-amzn-transcribe-language-model-name"];
327
339
  }
340
+ if (output.headers["x-amzn-transcribe-identify-language"] !== undefined) {
341
+ contents.IdentifyLanguage = smithy_client_1.parseBoolean(output.headers["x-amzn-transcribe-identify-language"]);
342
+ }
343
+ if (output.headers["x-amzn-transcribe-language-options"] !== undefined) {
344
+ contents.LanguageOptions = output.headers["x-amzn-transcribe-language-options"];
345
+ }
346
+ if (output.headers["x-amzn-transcribe-preferred-language"] !== undefined) {
347
+ contents.PreferredLanguage = output.headers["x-amzn-transcribe-preferred-language"];
348
+ }
328
349
  const data = context.eventStreamMarshaller.deserialize(output.body, async (event) => {
329
350
  const eventName = Object.keys(event)[0];
330
351
  const eventHeaders = Object.entries(event[eventName].headers).reduce((accummulator, curr) => {
@@ -700,6 +721,22 @@ const deserializeAws_restJson1ItemList = (output, context) => {
700
721
  return deserializeAws_restJson1Item(entry, context);
701
722
  });
702
723
  };
724
+ const deserializeAws_restJson1LanguageIdentification = (output, context) => {
725
+ return (output || [])
726
+ .filter((e) => e != null)
727
+ .map((entry) => {
728
+ if (entry === null) {
729
+ return null;
730
+ }
731
+ return deserializeAws_restJson1LanguageWithScore(entry, context);
732
+ });
733
+ };
734
+ const deserializeAws_restJson1LanguageWithScore = (output, context) => {
735
+ return {
736
+ LanguageCode: smithy_client_1.expectString(output.LanguageCode),
737
+ Score: smithy_client_1.limitedParseDouble(output.Score),
738
+ };
739
+ };
703
740
  const deserializeAws_restJson1LimitExceededException = (output, context) => {
704
741
  return {
705
742
  Message: smithy_client_1.expectString(output.Message),
@@ -842,6 +879,10 @@ const deserializeAws_restJson1Result = (output, context) => {
842
879
  ChannelId: smithy_client_1.expectString(output.ChannelId),
843
880
  EndTime: smithy_client_1.limitedParseDouble(output.EndTime),
844
881
  IsPartial: smithy_client_1.expectBoolean(output.IsPartial),
882
+ LanguageCode: smithy_client_1.expectString(output.LanguageCode),
883
+ LanguageIdentification: output.LanguageIdentification !== undefined && output.LanguageIdentification !== null
884
+ ? deserializeAws_restJson1LanguageIdentification(output.LanguageIdentification, context)
885
+ : undefined,
845
886
  ResultId: smithy_client_1.expectString(output.ResultId),
846
887
  StartTime: smithy_client_1.limitedParseDouble(output.StartTime),
847
888
  };
@@ -70,6 +70,10 @@ export var LanguageCode;
70
70
  LanguageCode["PT_BR"] = "pt-BR";
71
71
  LanguageCode["ZH_CN"] = "zh-CN";
72
72
  })(LanguageCode || (LanguageCode = {}));
73
+ export var LanguageWithScore;
74
+ (function (LanguageWithScore) {
75
+ LanguageWithScore.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
76
+ })(LanguageWithScore || (LanguageWithScore = {}));
73
77
  export var LimitExceededException;
74
78
  (function (LimitExceededException) {
75
79
  LimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -47,7 +47,7 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
47
47
  case 0: return [4, context.endpoint()];
48
48
  case 1:
49
49
  _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
50
- headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
50
+ headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
51
51
  "x-amzn-transcribe-sample-rate": input.MediaSampleRateHertz.toString(),
52
52
  })), (isSerializableHeaderValue(input.MediaEncoding) && { "x-amzn-transcribe-media-encoding": input.MediaEncoding })), (isSerializableHeaderValue(input.VocabularyName) && {
53
53
  "x-amzn-transcribe-vocabulary-name": input.VocabularyName,
@@ -73,6 +73,12 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
73
73
  "x-amzn-transcribe-pii-entity-types": input.PiiEntityTypes,
74
74
  })), (isSerializableHeaderValue(input.LanguageModelName) && {
75
75
  "x-amzn-transcribe-language-model-name": input.LanguageModelName,
76
+ })), (isSerializableHeaderValue(input.IdentifyLanguage) && {
77
+ "x-amzn-transcribe-identify-language": input.IdentifyLanguage.toString(),
78
+ })), (isSerializableHeaderValue(input.LanguageOptions) && {
79
+ "x-amzn-transcribe-language-options": input.LanguageOptions,
80
+ })), (isSerializableHeaderValue(input.PreferredLanguage) && {
81
+ "x-amzn-transcribe-preferred-language": input.PreferredLanguage,
76
82
  }));
77
83
  resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/stream-transcription";
78
84
  if (input.AudioStream !== undefined) {
@@ -259,13 +265,16 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
259
265
  ContentRedactionType: undefined,
260
266
  EnableChannelIdentification: undefined,
261
267
  EnablePartialResultsStabilization: undefined,
268
+ IdentifyLanguage: undefined,
262
269
  LanguageCode: undefined,
263
270
  LanguageModelName: undefined,
271
+ LanguageOptions: undefined,
264
272
  MediaEncoding: undefined,
265
273
  MediaSampleRateHertz: undefined,
266
274
  NumberOfChannels: undefined,
267
275
  PartialResultsStability: undefined,
268
276
  PiiEntityTypes: undefined,
277
+ PreferredLanguage: undefined,
269
278
  RequestId: undefined,
270
279
  SessionId: undefined,
271
280
  ShowSpeakerLabel: undefined,
@@ -325,6 +334,15 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
325
334
  if (output.headers["x-amzn-transcribe-language-model-name"] !== undefined) {
326
335
  contents.LanguageModelName = output.headers["x-amzn-transcribe-language-model-name"];
327
336
  }
337
+ if (output.headers["x-amzn-transcribe-identify-language"] !== undefined) {
338
+ contents.IdentifyLanguage = __parseBoolean(output.headers["x-amzn-transcribe-identify-language"]);
339
+ }
340
+ if (output.headers["x-amzn-transcribe-language-options"] !== undefined) {
341
+ contents.LanguageOptions = output.headers["x-amzn-transcribe-language-options"];
342
+ }
343
+ if (output.headers["x-amzn-transcribe-preferred-language"] !== undefined) {
344
+ contents.PreferredLanguage = output.headers["x-amzn-transcribe-preferred-language"];
345
+ }
328
346
  data = context.eventStreamMarshaller.deserialize(output.body, function (event) { return __awaiter(void 0, void 0, void 0, function () {
329
347
  var eventName, eventHeaders, eventMessage, parsedEvent;
330
348
  var _a;
@@ -798,6 +816,22 @@ var deserializeAws_restJson1ItemList = function (output, context) {
798
816
  return deserializeAws_restJson1Item(entry, context);
799
817
  });
800
818
  };
819
+ var deserializeAws_restJson1LanguageIdentification = function (output, context) {
820
+ return (output || [])
821
+ .filter(function (e) { return e != null; })
822
+ .map(function (entry) {
823
+ if (entry === null) {
824
+ return null;
825
+ }
826
+ return deserializeAws_restJson1LanguageWithScore(entry, context);
827
+ });
828
+ };
829
+ var deserializeAws_restJson1LanguageWithScore = function (output, context) {
830
+ return {
831
+ LanguageCode: __expectString(output.LanguageCode),
832
+ Score: __limitedParseDouble(output.Score),
833
+ };
834
+ };
801
835
  var deserializeAws_restJson1LimitExceededException = function (output, context) {
802
836
  return {
803
837
  Message: __expectString(output.Message),
@@ -940,6 +974,10 @@ var deserializeAws_restJson1Result = function (output, context) {
940
974
  ChannelId: __expectString(output.ChannelId),
941
975
  EndTime: __limitedParseDouble(output.EndTime),
942
976
  IsPartial: __expectBoolean(output.IsPartial),
977
+ LanguageCode: __expectString(output.LanguageCode),
978
+ LanguageIdentification: output.LanguageIdentification !== undefined && output.LanguageIdentification !== null
979
+ ? deserializeAws_restJson1LanguageIdentification(output.LanguageIdentification, context)
980
+ : undefined,
943
981
  ResultId: __expectString(output.ResultId),
944
982
  StartTime: __limitedParseDouble(output.StartTime),
945
983
  };
@@ -12,7 +12,7 @@ export interface Entity {
12
12
  */
13
13
  EndTime?: number;
14
14
  /**
15
- * <p>The category of of information identified in this entity; for example, PII.</p>
15
+ * <p>The category of information identified in this entity; for example, PII.</p>
16
16
  */
17
17
  Category?: string;
18
18
  /**
@@ -53,9 +53,9 @@ export interface Item {
53
53
  */
54
54
  EndTime?: number;
55
55
  /**
56
- * <p>The type of the item. <code>PRONUNCIATION</code> indicates that the item is a word that
57
- * was recognized in the input audio. <code>PUNCTUATION</code> indicates that the item was
58
- * interpreted as a pause in the input audio.</p>
56
+ * <p>The type of the item. <code>PRONUNCIATION</code> indicates that the item is a word
57
+ * that was recognized in the input audio. <code>PUNCTUATION</code> indicates that the item
58
+ * was interpreted as a pause in the input audio.</p>
59
59
  */
60
60
  Type?: ItemType | string;
61
61
  /**
@@ -64,17 +64,17 @@ export interface Item {
64
64
  Content?: string;
65
65
  /**
66
66
  * <p>Indicates whether a word in the item matches a word in the vocabulary filter you've chosen
67
- * for your real-time stream. If <code>true</code> then a word in the item matches your
67
+ * for your media stream. If <code>true</code> then a word in the item matches your
68
68
  * vocabulary filter.</p>
69
69
  */
70
70
  VocabularyFilterMatch?: boolean;
71
71
  /**
72
- * <p>If speaker identification is enabled, shows the speakers identified in the real-time
72
+ * <p>If speaker identification is enabled, shows the speakers identified in the media
73
73
  * stream.</p>
74
74
  */
75
75
  Speaker?: string;
76
76
  /**
77
- * <p>A value between 0 and 1 for an item that is a confidence score that Amazon Transcribe assigns to each
77
+ * <p>A value between zero and one for an item that is a confidence score that Amazon Transcribe assigns to each
78
78
  * word or phrase that it transcribes.</p>
79
79
  */
80
80
  Confidence?: number;
@@ -231,6 +231,29 @@ export declare enum LanguageCode {
231
231
  PT_BR = "pt-BR",
232
232
  ZH_CN = "zh-CN"
233
233
  }
234
+ /**
235
+ * <p>The language codes of the identified languages and their associated confidence scores.
236
+ * The confidence score is a value between zero and one; a larger value indicates a higher
237
+ * confidence in the identified language.</p>
238
+ */
239
+ export interface LanguageWithScore {
240
+ /**
241
+ * <p>The language code of the language identified by Amazon Transcribe.</p>
242
+ */
243
+ LanguageCode?: LanguageCode | string;
244
+ /**
245
+ * <p>The confidence score for the associated language code. Confidence scores are values
246
+ * between zero and one; larger values indicate a higher confidence in the identified language.
247
+ * </p>
248
+ */
249
+ Score?: number;
250
+ }
251
+ export declare namespace LanguageWithScore {
252
+ /**
253
+ * @internal
254
+ */
255
+ const filterSensitiveLog: (obj: LanguageWithScore) => any;
256
+ }
234
257
  /**
235
258
  * <p>You have exceeded the maximum number of concurrent transcription streams, are starting
236
259
  * transcription streams too quickly, or the maximum audio length of 4 hours. Wait until a stream
@@ -599,7 +622,7 @@ export interface Result {
599
622
  IsPartial?: boolean;
600
623
  /**
601
624
  * <p>A list of possible transcriptions for the audio. Each alternative typically contains one
602
- * <code>item</code> that contains the result of the transcription.</p>
625
+ * <code>item</code> that contains the result of the transcription.</p>
603
626
  */
604
627
  Alternatives?: Alternative[];
605
628
  /**
@@ -609,6 +632,14 @@ export interface Result {
609
632
  * channel in your audio stream.</p>
610
633
  */
611
634
  ChannelId?: string;
635
+ /**
636
+ * <p>The language code of the identified language in your media stream.</p>
637
+ */
638
+ LanguageCode?: LanguageCode | string;
639
+ /**
640
+ * <p>The language code of the dominant language identified in your media.</p>
641
+ */
642
+ LanguageIdentification?: LanguageWithScore[];
612
643
  }
613
644
  export declare namespace Result {
614
645
  /**
@@ -767,12 +798,12 @@ export declare enum VocabularyFilterMethod {
767
798
  }
768
799
  export interface StartStreamTranscriptionRequest {
769
800
  /**
770
- * <p>Indicates the source language used in the input audio stream.</p>
801
+ * <p>The language code of the input audio stream.</p>
771
802
  */
772
- LanguageCode: LanguageCode | string | undefined;
803
+ LanguageCode?: LanguageCode | string;
773
804
  /**
774
- * <p>The sample rate, in Hertz, of the input audio. We suggest that you use 8,000 Hz for low
775
- * quality audio and 16,000 Hz for high quality audio.</p>
805
+ * <p>The sample rate, in Hertz (Hz), of the input audio. We suggest that you use 8,000 Hz
806
+ * for low quality audio and 16,000 Hz or higher for high quality audio.</p>
776
807
  */
777
808
  MediaSampleRateHertz: number | undefined;
778
809
  /**
@@ -801,24 +832,24 @@ export interface StartStreamTranscriptionRequest {
801
832
  VocabularyFilterName?: string;
802
833
  /**
803
834
  * <p>The manner in which you use your vocabulary filter to filter words in your transcript.
804
- * <code>Remove</code> removes filtered words from your transcription results.
805
- * <code>Mask</code> masks filtered words with a <code>***</code> in your transcription results.
806
- * <code>Tag</code> keeps the filtered words in your transcription results and tags them. The
807
- * tag appears as <code>VocabularyFilterMatch</code> equal to <code>True</code>
808
- * </p>
835
+ * <code>Remove</code> removes filtered words from your transcription results.
836
+ * <code>Mask</code> masks filtered words with a <code>***</code> in your transcription
837
+ * results. <code>Tag</code> keeps the filtered words in your transcription results and tags
838
+ * them. The tag appears as <code>VocabularyFilterMatch</code> equal to
839
+ * <code>True</code>.</p>
809
840
  */
810
841
  VocabularyFilterMethod?: VocabularyFilterMethod | string;
811
842
  /**
812
- * <p>When <code>true</code>, enables speaker identification in your real-time stream.</p>
843
+ * <p>When <code>true</code>, enables speaker identification in your media stream.</p>
813
844
  */
814
845
  ShowSpeakerLabel?: boolean;
815
846
  /**
816
- * <p>When <code>true</code>, instructs Amazon Transcribe to process each audio channel separately and then
817
- * merge the transcription output of each channel into a single transcription.</p>
847
+ * <p>When <code>true</code>, instructs Amazon Transcribe to process each audio channel separately,
848
+ * then merges the transcription output of each channel into a single transcription.</p>
818
849
  * <p>Amazon Transcribe also produces a transcription of each item. An item includes the start time, end
819
850
  * time, and any alternative transcriptions.</p>
820
851
  * <p>You can't set both <code>ShowSpeakerLabel</code> and
821
- * <code>EnableChannelIdentification</code> in the same request. If you set both, your request
852
+ * <code>EnableChannelIdentification</code> in the same request. If you set both, your request
822
853
  * returns a <code>BadRequestException</code>.</p>
823
854
  */
824
855
  EnableChannelIdentification?: boolean;
@@ -840,26 +871,66 @@ export interface StartStreamTranscriptionRequest {
840
871
  */
841
872
  PartialResultsStability?: PartialResultsStability | string;
842
873
  /**
843
- * <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>
844
- * <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>
874
+ * <p>Set this field to PII to identify personally identifiable information (PII) in the transcription
875
+ * output. Content identification is performed only upon complete transcription of the audio
876
+ * segments.</p>
877
+ * <p>You can’t set both <code>ContentIdentificationType</code> and
878
+ * <code>ContentRedactionType</code> in the same request. If you set both, your request
879
+ * returns a <code>BadRequestException</code>.</p>
845
880
  */
846
881
  ContentIdentificationType?: ContentIdentificationType | string;
847
882
  /**
848
- * <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>
849
- * <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>
883
+ * <p>Set this field to PII to redact personally identifiable information (PII) in the transcription
884
+ * output. Content redaction is performed only upon complete transcription of the audio
885
+ * segments.</p>
886
+ * <p>You can’t set both <code>ContentRedactionType</code> and
887
+ * <code>ContentIdentificationType</code> in the same request. If you set both, your request
888
+ * returns a <code>BadRequestException</code>.</p>
850
889
  */
851
890
  ContentRedactionType?: ContentRedactionType | string;
852
891
  /**
853
- * <p>List the PII entity types you want to identify or redact. In order to specify entity types, you must have
854
- * either <code>ContentIdentificationType</code> or <code>ContentRedactionType</code> enabled.</p>
892
+ * <p>List the PII entity types you want to identify or redact. In order to specify entity types,
893
+ * you must have either <code>ContentIdentificationType</code> or
894
+ * <code>ContentRedactionType</code> enabled.</p>
855
895
  * <p>
856
- * <code>PiiEntityTypes</code> is an optional parameter with a default value of <code>ALL</code>.</p>
896
+ * <code>PIIEntityTypes</code> must be comma-separated; the available values are:
897
+ * <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>,
898
+ * <code>CREDIT_DEBIT_NUMBER</code>, <code>CREDIT_DEBIT_CVV</code>,
899
+ * <code>CREDIT_DEBIT_EXPIRY</code>, <code>PIN</code>, <code>EMAIL</code>,
900
+ * <code>ADDRESS</code>, <code>NAME</code>, <code>PHONE</code>,
901
+ * <code>SSN</code>, and <code>ALL</code>.</p>
902
+ * <p>
903
+ * <code>PiiEntityTypes</code> is an optional parameter with a default value of
904
+ * <code>ALL</code>.</p>
857
905
  */
858
906
  PiiEntityTypes?: string;
859
907
  /**
860
908
  * <p>The name of the language model you want to use.</p>
861
909
  */
862
910
  LanguageModelName?: string;
911
+ /**
912
+ * <p>Optional. Set this value to <code>true</code> to enable language identification for
913
+ * your media stream.</p>
914
+ */
915
+ IdentifyLanguage?: boolean;
916
+ /**
917
+ * <p>An object containing a list of languages that might be present in your audio.</p>
918
+ * <p>You must provide two or more language codes to help Amazon Transcribe identify the correct
919
+ * language of your media stream with the highest possible accuracy. You can only select one
920
+ * variant per language; for example, you can't include both <code>en-US</code> and
921
+ * <code>en-UK</code> in the same request.</p>
922
+ * <p>You can only use this parameter if you've set <code>IdentifyLanguage</code> to
923
+ * <code>true</code>in your request.</p>
924
+ */
925
+ LanguageOptions?: string;
926
+ /**
927
+ * <p>Optional. From the subset of languages codes you provided for
928
+ * <code>LanguageOptions</code>, you can select one preferred language for your
929
+ * transcription.</p>
930
+ * <p>You can only use this parameter if you've set <code>IdentifyLanguage</code> to
931
+ * <code>true</code>in your request.</p>
932
+ */
933
+ PreferredLanguage?: LanguageCode | string;
863
934
  }
864
935
  export declare namespace StartStreamTranscriptionRequest {
865
936
  /**
@@ -909,8 +980,7 @@ export declare namespace TranscriptResultStream {
909
980
  /**
910
981
  * <p>A portion of the transcription of the audio stream. Events are sent periodically from
911
982
  * Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio
912
- * stream, or it can be the entire transcription of that portion of the audio stream.
913
- * </p>
983
+ * stream, or it can be the entire transcription of that portion of the audio stream. </p>
914
984
  */
915
985
  interface TranscriptEventMember {
916
986
  TranscriptEvent: TranscriptEvent;
@@ -1014,12 +1084,12 @@ export interface StartStreamTranscriptionResponse {
1014
1084
  */
1015
1085
  RequestId?: string;
1016
1086
  /**
1017
- * <p>The language code for the input audio stream.</p>
1087
+ * <p>The language code of the input audio stream.</p>
1018
1088
  */
1019
1089
  LanguageCode?: LanguageCode | string;
1020
1090
  /**
1021
- * <p>The sample rate for the input audio stream. Use 8,000 Hz for low quality audio and 16,000 Hz
1022
- * for high quality audio.</p>
1091
+ * <p>The sample rate, in Hertz (Hz), for the input audio stream. Use 8,000 Hz for low quality
1092
+ * audio and 16,000 Hz or higher for high quality audio.</p>
1023
1093
  */
1024
1094
  MediaSampleRateHertz?: number;
1025
1095
  /**
@@ -1039,11 +1109,11 @@ export interface StartStreamTranscriptionResponse {
1039
1109
  */
1040
1110
  TranscriptResultStream?: AsyncIterable<TranscriptResultStream>;
1041
1111
  /**
1042
- * <p>The name of the vocabulary filter used in your real-time stream.</p>
1112
+ * <p>The name of the vocabulary filter used in your media stream.</p>
1043
1113
  */
1044
1114
  VocabularyFilterName?: string;
1045
1115
  /**
1046
- * <p>The vocabulary filtering method used in the real-time stream.</p>
1116
+ * <p>The vocabulary filtering method used in the media stream.</p>
1047
1117
  */
1048
1118
  VocabularyFilterMethod?: VocabularyFilterMethod | string;
1049
1119
  /**
@@ -1079,7 +1149,23 @@ export interface StartStreamTranscriptionResponse {
1079
1149
  * <p>Lists the PII entity types you specified in your request.</p>
1080
1150
  */
1081
1151
  PiiEntityTypes?: string;
1152
+ /**
1153
+ * <p>The name of the language model used in your media stream.</p>
1154
+ */
1082
1155
  LanguageModelName?: string;
1156
+ /**
1157
+ * <p>The language code of the language identified in your media stream.</p>
1158
+ */
1159
+ IdentifyLanguage?: boolean;
1160
+ /**
1161
+ * <p>The language codes used in the identification of your media stream's predominant
1162
+ * language.</p>
1163
+ */
1164
+ LanguageOptions?: string;
1165
+ /**
1166
+ * <p>The preferred language you specified in your request.</p>
1167
+ */
1168
+ PreferredLanguage?: LanguageCode | string;
1083
1169
  }
1084
1170
  export declare namespace StartStreamTranscriptionResponse {
1085
1171
  /**
@@ -141,6 +141,17 @@ export declare enum LanguageCode {
141
141
  ZH_CN = "zh-CN"
142
142
  }
143
143
 
144
+ export interface LanguageWithScore {
145
+
146
+ LanguageCode?: LanguageCode | string;
147
+
148
+ Score?: number;
149
+ }
150
+ export declare namespace LanguageWithScore {
151
+
152
+ const filterSensitiveLog: (obj: LanguageWithScore) => any;
153
+ }
154
+
144
155
  export interface LimitExceededException extends __SmithyException, $MetadataBearer {
145
156
  name: "LimitExceededException";
146
157
  $fault: "client";
@@ -361,6 +372,10 @@ export interface Result {
361
372
  Alternatives?: Alternative[];
362
373
 
363
374
  ChannelId?: string;
375
+
376
+ LanguageCode?: LanguageCode | string;
377
+
378
+ LanguageIdentification?: LanguageWithScore[];
364
379
  }
365
380
  export declare namespace Result {
366
381
 
@@ -447,7 +462,7 @@ export declare enum VocabularyFilterMethod {
447
462
  }
448
463
  export interface StartStreamTranscriptionRequest {
449
464
 
450
- LanguageCode: LanguageCode | string | undefined;
465
+ LanguageCode?: LanguageCode | string;
451
466
 
452
467
  MediaSampleRateHertz: number | undefined;
453
468
 
@@ -480,6 +495,12 @@ export interface StartStreamTranscriptionRequest {
480
495
  PiiEntityTypes?: string;
481
496
 
482
497
  LanguageModelName?: string;
498
+
499
+ IdentifyLanguage?: boolean;
500
+
501
+ LanguageOptions?: string;
502
+
503
+ PreferredLanguage?: LanguageCode | string;
483
504
  }
484
505
  export declare namespace StartStreamTranscriptionRequest {
485
506
 
@@ -626,7 +647,14 @@ export interface StartStreamTranscriptionResponse {
626
647
  ContentRedactionType?: ContentRedactionType | string;
627
648
 
628
649
  PiiEntityTypes?: string;
650
+
629
651
  LanguageModelName?: string;
652
+
653
+ IdentifyLanguage?: boolean;
654
+
655
+ LanguageOptions?: string;
656
+
657
+ PreferredLanguage?: LanguageCode | string;
630
658
  }
631
659
  export declare namespace StartStreamTranscriptionResponse {
632
660
 
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.42.0",
4
+ "version": "3.43.0",
5
5
  "scripts": {
6
6
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
7
7
  "build:cjs": "tsc -p tsconfig.json",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@aws-crypto/sha256-browser": "2.0.0",
25
25
  "@aws-crypto/sha256-js": "2.0.0",
26
- "@aws-sdk/client-sts": "3.42.0",
26
+ "@aws-sdk/client-sts": "3.43.0",
27
27
  "@aws-sdk/config-resolver": "3.40.0",
28
28
  "@aws-sdk/credential-provider-node": "3.41.0",
29
29
  "@aws-sdk/eventstream-handler-node": "3.40.0",