@aws-sdk/client-transcribe-streaming 3.215.0 → 3.218.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.
Files changed (27) hide show
  1. package/dist-cjs/TranscribeStreaming.js +15 -0
  2. package/dist-cjs/commands/StartCallAnalyticsStreamTranscriptionCommand.js +48 -0
  3. package/dist-cjs/commands/index.js +1 -0
  4. package/dist-cjs/endpoint/ruleset.js +4 -4
  5. package/dist-cjs/models/models_0.js +168 -41
  6. package/dist-cjs/protocols/Aws_restJson1.js +336 -1
  7. package/dist-es/TranscribeStreaming.js +15 -0
  8. package/dist-es/commands/StartCallAnalyticsStreamTranscriptionCommand.js +44 -0
  9. package/dist-es/commands/index.js +1 -0
  10. package/dist-es/endpoint/ruleset.js +4 -4
  11. package/dist-es/models/models_0.js +151 -39
  12. package/dist-es/protocols/Aws_restJson1.js +334 -1
  13. package/dist-types/TranscribeStreaming.d.ts +65 -9
  14. package/dist-types/TranscribeStreamingClient.d.ts +12 -4
  15. package/dist-types/commands/StartCallAnalyticsStreamTranscriptionCommand.d.ts +58 -0
  16. package/dist-types/commands/StartMedicalStreamTranscriptionCommand.d.ts +18 -0
  17. package/dist-types/commands/StartStreamTranscriptionCommand.d.ts +10 -7
  18. package/dist-types/commands/index.d.ts +1 -0
  19. package/dist-types/models/models_0.d.ts +776 -53
  20. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  21. package/dist-types/ts3.4/TranscribeStreaming.d.ts +23 -0
  22. package/dist-types/ts3.4/TranscribeStreamingClient.d.ts +6 -0
  23. package/dist-types/ts3.4/commands/StartCallAnalyticsStreamTranscriptionCommand.d.ts +41 -0
  24. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  25. package/dist-types/ts3.4/models/models_0.d.ts +302 -27
  26. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  27. package/package.json +4 -4
@@ -1,10 +1,49 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1StartStreamTranscriptionCommand = exports.deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = exports.serializeAws_restJson1StartStreamTranscriptionCommand = exports.serializeAws_restJson1StartMedicalStreamTranscriptionCommand = void 0;
3
+ exports.deserializeAws_restJson1StartStreamTranscriptionCommand = exports.deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = exports.deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = exports.serializeAws_restJson1StartStreamTranscriptionCommand = exports.serializeAws_restJson1StartMedicalStreamTranscriptionCommand = exports.serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const TranscribeStreamingServiceException_1 = require("../models/TranscribeStreamingServiceException");
8
+ const serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = async (input, context) => {
9
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const headers = map({}, isSerializableHeaderValue, {
11
+ "x-amzn-transcribe-language-code": input.LanguageCode,
12
+ "x-amzn-transcribe-sample-rate": [
13
+ () => isSerializableHeaderValue(input.MediaSampleRateHertz),
14
+ () => input.MediaSampleRateHertz.toString(),
15
+ ],
16
+ "x-amzn-transcribe-media-encoding": input.MediaEncoding,
17
+ "x-amzn-transcribe-vocabulary-name": input.VocabularyName,
18
+ "x-amzn-transcribe-session-id": input.SessionId,
19
+ "x-amzn-transcribe-vocabulary-filter-name": input.VocabularyFilterName,
20
+ "x-amzn-transcribe-vocabulary-filter-method": input.VocabularyFilterMethod,
21
+ "x-amzn-transcribe-language-model-name": input.LanguageModelName,
22
+ "x-amzn-transcribe-enable-partial-results-stabilization": [
23
+ () => isSerializableHeaderValue(input.EnablePartialResultsStabilization),
24
+ () => input.EnablePartialResultsStabilization.toString(),
25
+ ],
26
+ "x-amzn-transcribe-partial-results-stability": input.PartialResultsStability,
27
+ "x-amzn-transcribe-content-identification-type": input.ContentIdentificationType,
28
+ "x-amzn-transcribe-content-redaction-type": input.ContentRedactionType,
29
+ "x-amzn-transcribe-pii-entity-types": input.PiiEntityTypes,
30
+ });
31
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/call-analytics-stream-transcription";
32
+ let body;
33
+ if (input.AudioStream !== undefined) {
34
+ body = serializeAws_restJson1AudioStream(input.AudioStream, context);
35
+ }
36
+ return new protocol_http_1.HttpRequest({
37
+ protocol,
38
+ hostname,
39
+ port,
40
+ method: "POST",
41
+ headers,
42
+ path: resolvedPath,
43
+ body,
44
+ });
45
+ };
46
+ exports.serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand;
8
47
  const serializeAws_restJson1StartMedicalStreamTranscriptionCommand = async (input, context) => {
9
48
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
49
  const headers = map({}, isSerializableHeaderValue, {
@@ -107,6 +146,70 @@ const serializeAws_restJson1StartStreamTranscriptionCommand = async (input, cont
107
146
  });
108
147
  };
109
148
  exports.serializeAws_restJson1StartStreamTranscriptionCommand = serializeAws_restJson1StartStreamTranscriptionCommand;
149
+ const deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = async (output, context) => {
150
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
151
+ return deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommandError(output, context);
152
+ }
153
+ const contents = map({
154
+ $metadata: deserializeMetadata(output),
155
+ RequestId: [, output.headers["x-amzn-request-id"]],
156
+ LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
157
+ MediaSampleRateHertz: [
158
+ () => void 0 !== output.headers["x-amzn-transcribe-sample-rate"],
159
+ () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amzn-transcribe-sample-rate"]),
160
+ ],
161
+ MediaEncoding: [, output.headers["x-amzn-transcribe-media-encoding"]],
162
+ VocabularyName: [, output.headers["x-amzn-transcribe-vocabulary-name"]],
163
+ SessionId: [, output.headers["x-amzn-transcribe-session-id"]],
164
+ VocabularyFilterName: [, output.headers["x-amzn-transcribe-vocabulary-filter-name"]],
165
+ VocabularyFilterMethod: [, output.headers["x-amzn-transcribe-vocabulary-filter-method"]],
166
+ LanguageModelName: [, output.headers["x-amzn-transcribe-language-model-name"]],
167
+ EnablePartialResultsStabilization: [
168
+ () => void 0 !== output.headers["x-amzn-transcribe-enable-partial-results-stabilization"],
169
+ () => (0, smithy_client_1.parseBoolean)(output.headers["x-amzn-transcribe-enable-partial-results-stabilization"]),
170
+ ],
171
+ PartialResultsStability: [, output.headers["x-amzn-transcribe-partial-results-stability"]],
172
+ ContentIdentificationType: [, output.headers["x-amzn-transcribe-content-identification-type"]],
173
+ ContentRedactionType: [, output.headers["x-amzn-transcribe-content-redaction-type"]],
174
+ PiiEntityTypes: [, output.headers["x-amzn-transcribe-pii-entity-types"]],
175
+ });
176
+ const data = output.body;
177
+ contents.CallAnalyticsTranscriptResultStream = deserializeAws_restJson1CallAnalyticsTranscriptResultStream(data, context);
178
+ return contents;
179
+ };
180
+ exports.deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand = deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand;
181
+ const deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommandError = async (output, context) => {
182
+ const parsedOutput = {
183
+ ...output,
184
+ body: await parseErrorBody(output.body, context),
185
+ };
186
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
187
+ switch (errorCode) {
188
+ case "BadRequestException":
189
+ case "com.amazonaws.transcribestreaming#BadRequestException":
190
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
191
+ case "ConflictException":
192
+ case "com.amazonaws.transcribestreaming#ConflictException":
193
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
194
+ case "InternalFailureException":
195
+ case "com.amazonaws.transcribestreaming#InternalFailureException":
196
+ throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
197
+ case "LimitExceededException":
198
+ case "com.amazonaws.transcribestreaming#LimitExceededException":
199
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
200
+ case "ServiceUnavailableException":
201
+ case "com.amazonaws.transcribestreaming#ServiceUnavailableException":
202
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
203
+ default:
204
+ const parsedBody = parsedOutput.body;
205
+ (0, smithy_client_1.throwDefaultError)({
206
+ output,
207
+ parsedBody,
208
+ exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
209
+ errorCode,
210
+ });
211
+ }
212
+ };
110
213
  const deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = async (output, context) => {
111
214
  if (output.statusCode !== 200 && output.statusCode >= 300) {
112
215
  return deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError(output, context);
@@ -323,6 +426,7 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
323
426
  const serializeAws_restJson1AudioStream = (input, context) => {
324
427
  const eventMarshallingVisitor = (event) => models_0_1.AudioStream.visit(event, {
325
428
  AudioEvent: (value) => serializeAws_restJson1AudioEvent_event(value, context),
429
+ ConfigurationEvent: (value) => serializeAws_restJson1ConfigurationEvent_event(value, context),
326
430
  _: (value) => value,
327
431
  });
328
432
  return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
@@ -339,6 +443,57 @@ const serializeAws_restJson1AudioEvent_event = (input, context) => {
339
443
  }
340
444
  return { headers, body };
341
445
  };
446
+ const serializeAws_restJson1ConfigurationEvent_event = (input, context) => {
447
+ const headers = {
448
+ ":event-type": { type: "string", value: "ConfigurationEvent" },
449
+ ":message-type": { type: "string", value: "event" },
450
+ ":content-type": { type: "string", value: "application/json" },
451
+ };
452
+ let body = new Uint8Array();
453
+ body = serializeAws_restJson1ConfigurationEvent(input, context);
454
+ body = context.utf8Decoder(JSON.stringify(body));
455
+ return { headers, body };
456
+ };
457
+ const deserializeAws_restJson1CallAnalyticsTranscriptResultStream = (output, context) => {
458
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
459
+ if (event["UtteranceEvent"] != null) {
460
+ return {
461
+ UtteranceEvent: await deserializeAws_restJson1UtteranceEvent_event(event["UtteranceEvent"], context),
462
+ };
463
+ }
464
+ if (event["CategoryEvent"] != null) {
465
+ return {
466
+ CategoryEvent: await deserializeAws_restJson1CategoryEvent_event(event["CategoryEvent"], context),
467
+ };
468
+ }
469
+ if (event["BadRequestException"] != null) {
470
+ return {
471
+ BadRequestException: await deserializeAws_restJson1BadRequestException_event(event["BadRequestException"], context),
472
+ };
473
+ }
474
+ if (event["LimitExceededException"] != null) {
475
+ return {
476
+ LimitExceededException: await deserializeAws_restJson1LimitExceededException_event(event["LimitExceededException"], context),
477
+ };
478
+ }
479
+ if (event["InternalFailureException"] != null) {
480
+ return {
481
+ InternalFailureException: await deserializeAws_restJson1InternalFailureException_event(event["InternalFailureException"], context),
482
+ };
483
+ }
484
+ if (event["ConflictException"] != null) {
485
+ return {
486
+ ConflictException: await deserializeAws_restJson1ConflictException_event(event["ConflictException"], context),
487
+ };
488
+ }
489
+ if (event["ServiceUnavailableException"] != null) {
490
+ return {
491
+ ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
492
+ };
493
+ }
494
+ return { $unknown: output };
495
+ });
496
+ };
342
497
  const deserializeAws_restJson1MedicalTranscriptResultStream = (output, context) => {
343
498
  return context.eventStreamMarshaller.deserialize(output, async (event) => {
344
499
  if (event["TranscriptEvent"] != null) {
@@ -416,6 +571,12 @@ const deserializeAws_restJson1BadRequestException_event = async (output, context
416
571
  };
417
572
  return deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
418
573
  };
574
+ const deserializeAws_restJson1CategoryEvent_event = async (output, context) => {
575
+ const contents = {};
576
+ const data = await parseBody(output.body, context);
577
+ Object.assign(contents, deserializeAws_restJson1CategoryEvent(data, context));
578
+ return contents;
579
+ };
419
580
  const deserializeAws_restJson1ConflictException_event = async (output, context) => {
420
581
  const parsedOutput = {
421
582
  ...output,
@@ -456,6 +617,43 @@ const deserializeAws_restJson1TranscriptEvent_event = async (output, context) =>
456
617
  Object.assign(contents, deserializeAws_restJson1TranscriptEvent(data, context));
457
618
  return contents;
458
619
  };
620
+ const deserializeAws_restJson1UtteranceEvent_event = async (output, context) => {
621
+ const contents = {};
622
+ const data = await parseBody(output.body, context);
623
+ Object.assign(contents, deserializeAws_restJson1UtteranceEvent(data, context));
624
+ return contents;
625
+ };
626
+ const serializeAws_restJson1ChannelDefinition = (input, context) => {
627
+ return {
628
+ ...(input.ChannelId != null && { ChannelId: input.ChannelId }),
629
+ ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }),
630
+ };
631
+ };
632
+ const serializeAws_restJson1ChannelDefinitions = (input, context) => {
633
+ return input
634
+ .filter((e) => e != null)
635
+ .map((entry) => {
636
+ return serializeAws_restJson1ChannelDefinition(entry, context);
637
+ });
638
+ };
639
+ const serializeAws_restJson1ConfigurationEvent = (input, context) => {
640
+ return {
641
+ ...(input.ChannelDefinitions != null && {
642
+ ChannelDefinitions: serializeAws_restJson1ChannelDefinitions(input.ChannelDefinitions, context),
643
+ }),
644
+ ...(input.PostCallAnalyticsSettings != null && {
645
+ PostCallAnalyticsSettings: serializeAws_restJson1PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context),
646
+ }),
647
+ };
648
+ };
649
+ const serializeAws_restJson1PostCallAnalyticsSettings = (input, context) => {
650
+ return {
651
+ ...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }),
652
+ ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
653
+ ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }),
654
+ ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }),
655
+ };
656
+ };
459
657
  const deserializeAws_restJson1Alternative = (output, context) => {
460
658
  return {
461
659
  Entities: output.Entities != null ? deserializeAws_restJson1EntityList(output.Entities, context) : undefined,
@@ -474,6 +672,65 @@ const deserializeAws_restJson1AlternativeList = (output, context) => {
474
672
  });
475
673
  return retVal;
476
674
  };
675
+ const deserializeAws_restJson1CallAnalyticsEntity = (output, context) => {
676
+ return {
677
+ BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
678
+ Category: (0, smithy_client_1.expectString)(output.Category),
679
+ Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
680
+ Content: (0, smithy_client_1.expectString)(output.Content),
681
+ EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
682
+ Type: (0, smithy_client_1.expectString)(output.Type),
683
+ };
684
+ };
685
+ const deserializeAws_restJson1CallAnalyticsEntityList = (output, context) => {
686
+ const retVal = (output || [])
687
+ .filter((e) => e != null)
688
+ .map((entry) => {
689
+ if (entry === null) {
690
+ return null;
691
+ }
692
+ return deserializeAws_restJson1CallAnalyticsEntity(entry, context);
693
+ });
694
+ return retVal;
695
+ };
696
+ const deserializeAws_restJson1CallAnalyticsItem = (output, context) => {
697
+ return {
698
+ BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
699
+ Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
700
+ Content: (0, smithy_client_1.expectString)(output.Content),
701
+ EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
702
+ Stable: (0, smithy_client_1.expectBoolean)(output.Stable),
703
+ Type: (0, smithy_client_1.expectString)(output.Type),
704
+ VocabularyFilterMatch: (0, smithy_client_1.expectBoolean)(output.VocabularyFilterMatch),
705
+ };
706
+ };
707
+ const deserializeAws_restJson1CallAnalyticsItemList = (output, context) => {
708
+ const retVal = (output || [])
709
+ .filter((e) => e != null)
710
+ .map((entry) => {
711
+ if (entry === null) {
712
+ return null;
713
+ }
714
+ return deserializeAws_restJson1CallAnalyticsItem(entry, context);
715
+ });
716
+ return retVal;
717
+ };
718
+ const deserializeAws_restJson1CategoryEvent = (output, context) => {
719
+ return {
720
+ MatchedCategories: output.MatchedCategories != null
721
+ ? deserializeAws_restJson1StringList(output.MatchedCategories, context)
722
+ : undefined,
723
+ MatchedDetails: output.MatchedDetails != null
724
+ ? deserializeAws_restJson1MatchedCategoryDetails(output.MatchedDetails, context)
725
+ : undefined,
726
+ };
727
+ };
728
+ const deserializeAws_restJson1CharacterOffsets = (output, context) => {
729
+ return {
730
+ Begin: (0, smithy_client_1.expectInt32)(output.Begin),
731
+ End: (0, smithy_client_1.expectInt32)(output.End),
732
+ };
733
+ };
477
734
  const deserializeAws_restJson1Entity = (output, context) => {
478
735
  return {
479
736
  Category: (0, smithy_client_1.expectString)(output.Category),
@@ -495,6 +752,24 @@ const deserializeAws_restJson1EntityList = (output, context) => {
495
752
  });
496
753
  return retVal;
497
754
  };
755
+ const deserializeAws_restJson1IssueDetected = (output, context) => {
756
+ return {
757
+ CharacterOffsets: output.CharacterOffsets != null
758
+ ? deserializeAws_restJson1CharacterOffsets(output.CharacterOffsets, context)
759
+ : undefined,
760
+ };
761
+ };
762
+ const deserializeAws_restJson1IssuesDetected = (output, context) => {
763
+ const retVal = (output || [])
764
+ .filter((e) => e != null)
765
+ .map((entry) => {
766
+ if (entry === null) {
767
+ return null;
768
+ }
769
+ return deserializeAws_restJson1IssueDetected(entry, context);
770
+ });
771
+ return retVal;
772
+ };
498
773
  const deserializeAws_restJson1Item = (output, context) => {
499
774
  return {
500
775
  Confidence: (0, smithy_client_1.limitedParseDouble)(output.Confidence),
@@ -535,6 +810,15 @@ const deserializeAws_restJson1LanguageWithScore = (output, context) => {
535
810
  Score: (0, smithy_client_1.limitedParseDouble)(output.Score),
536
811
  };
537
812
  };
813
+ const deserializeAws_restJson1MatchedCategoryDetails = (output, context) => {
814
+ return Object.entries(output).reduce((acc, [key, value]) => {
815
+ if (value === null) {
816
+ return acc;
817
+ }
818
+ acc[key] = deserializeAws_restJson1PointsOfInterest(value, context);
819
+ return acc;
820
+ }, {});
821
+ };
538
822
  const deserializeAws_restJson1MedicalAlternative = (output, context) => {
539
823
  return {
540
824
  Entities: output.Entities != null ? deserializeAws_restJson1MedicalEntityList(output.Entities, context) : undefined,
@@ -627,6 +911,13 @@ const deserializeAws_restJson1MedicalTranscriptEvent = (output, context) => {
627
911
  Transcript: output.Transcript != null ? deserializeAws_restJson1MedicalTranscript(output.Transcript, context) : undefined,
628
912
  };
629
913
  };
914
+ const deserializeAws_restJson1PointsOfInterest = (output, context) => {
915
+ return {
916
+ TimestampRanges: output.TimestampRanges != null
917
+ ? deserializeAws_restJson1TimestampRanges(output.TimestampRanges, context)
918
+ : undefined,
919
+ };
920
+ };
630
921
  const deserializeAws_restJson1Result = (output, context) => {
631
922
  return {
632
923
  Alternatives: output.Alternatives != null ? deserializeAws_restJson1AlternativeList(output.Alternatives, context) : undefined,
@@ -652,6 +943,34 @@ const deserializeAws_restJson1ResultList = (output, context) => {
652
943
  });
653
944
  return retVal;
654
945
  };
946
+ const deserializeAws_restJson1StringList = (output, context) => {
947
+ const retVal = (output || [])
948
+ .filter((e) => e != null)
949
+ .map((entry) => {
950
+ if (entry === null) {
951
+ return null;
952
+ }
953
+ return (0, smithy_client_1.expectString)(entry);
954
+ });
955
+ return retVal;
956
+ };
957
+ const deserializeAws_restJson1TimestampRange = (output, context) => {
958
+ return {
959
+ BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
960
+ EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
961
+ };
962
+ };
963
+ const deserializeAws_restJson1TimestampRanges = (output, context) => {
964
+ const retVal = (output || [])
965
+ .filter((e) => e != null)
966
+ .map((entry) => {
967
+ if (entry === null) {
968
+ return null;
969
+ }
970
+ return deserializeAws_restJson1TimestampRange(entry, context);
971
+ });
972
+ return retVal;
973
+ };
655
974
  const deserializeAws_restJson1Transcript = (output, context) => {
656
975
  return {
657
976
  Results: output.Results != null ? deserializeAws_restJson1ResultList(output.Results, context) : undefined,
@@ -662,6 +981,22 @@ const deserializeAws_restJson1TranscriptEvent = (output, context) => {
662
981
  Transcript: output.Transcript != null ? deserializeAws_restJson1Transcript(output.Transcript, context) : undefined,
663
982
  };
664
983
  };
984
+ const deserializeAws_restJson1UtteranceEvent = (output, context) => {
985
+ return {
986
+ BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
987
+ EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
988
+ Entities: output.Entities != null ? deserializeAws_restJson1CallAnalyticsEntityList(output.Entities, context) : undefined,
989
+ IsPartial: (0, smithy_client_1.expectBoolean)(output.IsPartial),
990
+ IssuesDetected: output.IssuesDetected != null
991
+ ? deserializeAws_restJson1IssuesDetected(output.IssuesDetected, context)
992
+ : undefined,
993
+ Items: output.Items != null ? deserializeAws_restJson1CallAnalyticsItemList(output.Items, context) : undefined,
994
+ ParticipantRole: (0, smithy_client_1.expectString)(output.ParticipantRole),
995
+ Sentiment: (0, smithy_client_1.expectString)(output.Sentiment),
996
+ Transcript: (0, smithy_client_1.expectString)(output.Transcript),
997
+ UtteranceId: (0, smithy_client_1.expectString)(output.UtteranceId),
998
+ };
999
+ };
665
1000
  const deserializeMetadata = (output) => ({
666
1001
  httpStatusCode: output.statusCode,
667
1002
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,7 +1,22 @@
1
+ import { StartCallAnalyticsStreamTranscriptionCommand, } from "./commands/StartCallAnalyticsStreamTranscriptionCommand";
1
2
  import { StartMedicalStreamTranscriptionCommand, } from "./commands/StartMedicalStreamTranscriptionCommand";
2
3
  import { StartStreamTranscriptionCommand, } from "./commands/StartStreamTranscriptionCommand";
3
4
  import { TranscribeStreamingClient } from "./TranscribeStreamingClient";
4
5
  export class TranscribeStreaming extends TranscribeStreamingClient {
6
+ startCallAnalyticsStreamTranscription(args, optionsOrCb, cb) {
7
+ const command = new StartCallAnalyticsStreamTranscriptionCommand(args);
8
+ if (typeof optionsOrCb === "function") {
9
+ this.send(command, optionsOrCb);
10
+ }
11
+ else if (typeof cb === "function") {
12
+ if (typeof optionsOrCb !== "object")
13
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
14
+ this.send(command, optionsOrCb || {}, cb);
15
+ }
16
+ else {
17
+ return this.send(command, optionsOrCb);
18
+ }
19
+ }
5
20
  startMedicalStreamTranscription(args, optionsOrCb, cb) {
6
21
  const command = new StartMedicalStreamTranscriptionCommand(args);
7
22
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,44 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
3
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
4
+ import { Command as $Command } from "@aws-sdk/smithy-client";
5
+ import { StartCallAnalyticsStreamTranscriptionRequestFilterSensitiveLog, StartCallAnalyticsStreamTranscriptionResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand, serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand, } from "../protocols/Aws_restJson1";
7
+ export class StartCallAnalyticsStreamTranscriptionCommand extends $Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ }
12
+ static getEndpointParameterInstructions() {
13
+ return {
14
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
+ Endpoint: { type: "builtInParams", name: "endpoint" },
16
+ Region: { type: "builtInParams", name: "region" },
17
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
+ };
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, StartCallAnalyticsStreamTranscriptionCommand.getEndpointParameterInstructions()));
23
+ this.middlewareStack.use(getEventStreamPlugin(configuration));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "TranscribeStreamingClient";
27
+ const commandName = "StartCallAnalyticsStreamTranscriptionCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: StartCallAnalyticsStreamTranscriptionRequestFilterSensitiveLog,
33
+ outputFilterSensitiveLog: StartCallAnalyticsStreamTranscriptionResponseFilterSensitiveLog,
34
+ };
35
+ const { requestHandler } = configuration;
36
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
+ }
38
+ serialize(input, context) {
39
+ return serializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand(input, context);
40
+ }
41
+ deserialize(output, context) {
42
+ return deserializeAws_restJson1StartCallAnalyticsStreamTranscriptionCommand(output, context);
43
+ }
44
+ }
@@ -1,2 +1,3 @@
1
+ export * from "./StartCallAnalyticsStreamTranscriptionCommand";
1
2
  export * from "./StartMedicalStreamTranscriptionCommand";
2
3
  export * from "./StartStreamTranscriptionCommand";
@@ -274,12 +274,12 @@ export const ruleSet = {
274
274
  {
275
275
  ref: "Region",
276
276
  },
277
- "transcribestreaming-us-west-2",
277
+ "transcribestreaming-us-east-2",
278
278
  ],
279
279
  },
280
280
  ],
281
281
  endpoint: {
282
- url: "https://transcribestreaming-fips.us-west-2.amazonaws.com",
282
+ url: "https://transcribestreaming-fips.us-east-2.amazonaws.com",
283
283
  properties: {},
284
284
  headers: {},
285
285
  },
@@ -293,12 +293,12 @@ export const ruleSet = {
293
293
  {
294
294
  ref: "Region",
295
295
  },
296
- "transcribestreaming-us-east-2",
296
+ "transcribestreaming-us-west-2",
297
297
  ],
298
298
  },
299
299
  ],
300
300
  endpoint: {
301
- url: "https://transcribestreaming-fips.us-east-2.amazonaws.com",
301
+ url: "https://transcribestreaming-fips.us-west-2.amazonaws.com",
302
302
  properties: {},
303
303
  headers: {},
304
304
  },