Skip to content

Commit 28bc36d

Browse files
author
awstools
committed
feat(client-transcribe-streaming): This release adds support for AWS HealthScribe Streaming APIs within Amazon Transcribe.
1 parent ba2cc5d commit 28bc36d

File tree

9 files changed

+3145
-230
lines changed

9 files changed

+3145
-230
lines changed

clients/client-transcribe-streaming/src/TranscribeStreaming.ts

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22
import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5+
import {
6+
GetMedicalScribeStreamCommand,
7+
GetMedicalScribeStreamCommandInput,
8+
GetMedicalScribeStreamCommandOutput,
9+
} from "./commands/GetMedicalScribeStreamCommand";
510
import {
611
StartCallAnalyticsStreamTranscriptionCommand,
712
StartCallAnalyticsStreamTranscriptionCommandInput,
813
StartCallAnalyticsStreamTranscriptionCommandOutput,
914
} from "./commands/StartCallAnalyticsStreamTranscriptionCommand";
15+
import {
16+
StartMedicalScribeStreamCommand,
17+
StartMedicalScribeStreamCommandInput,
18+
StartMedicalScribeStreamCommandOutput,
19+
} from "./commands/StartMedicalScribeStreamCommand";
1020
import {
1121
StartMedicalStreamTranscriptionCommand,
1222
StartMedicalStreamTranscriptionCommandInput,
@@ -20,12 +30,31 @@ import {
2030
import { TranscribeStreamingClient, TranscribeStreamingClientConfig } from "./TranscribeStreamingClient";
2131

2232
const commands = {
33+
GetMedicalScribeStreamCommand,
2334
StartCallAnalyticsStreamTranscriptionCommand,
35+
StartMedicalScribeStreamCommand,
2436
StartMedicalStreamTranscriptionCommand,
2537
StartStreamTranscriptionCommand,
2638
};
2739

2840
export interface TranscribeStreaming {
41+
/**
42+
* @see {@link GetMedicalScribeStreamCommand}
43+
*/
44+
getMedicalScribeStream(
45+
args: GetMedicalScribeStreamCommandInput,
46+
options?: __HttpHandlerOptions
47+
): Promise<GetMedicalScribeStreamCommandOutput>;
48+
getMedicalScribeStream(
49+
args: GetMedicalScribeStreamCommandInput,
50+
cb: (err: any, data?: GetMedicalScribeStreamCommandOutput) => void
51+
): void;
52+
getMedicalScribeStream(
53+
args: GetMedicalScribeStreamCommandInput,
54+
options: __HttpHandlerOptions,
55+
cb: (err: any, data?: GetMedicalScribeStreamCommandOutput) => void
56+
): void;
57+
2958
/**
3059
* @see {@link StartCallAnalyticsStreamTranscriptionCommand}
3160
*/
@@ -43,6 +72,23 @@ export interface TranscribeStreaming {
4372
cb: (err: any, data?: StartCallAnalyticsStreamTranscriptionCommandOutput) => void
4473
): void;
4574

75+
/**
76+
* @see {@link StartMedicalScribeStreamCommand}
77+
*/
78+
startMedicalScribeStream(
79+
args: StartMedicalScribeStreamCommandInput,
80+
options?: __HttpHandlerOptions
81+
): Promise<StartMedicalScribeStreamCommandOutput>;
82+
startMedicalScribeStream(
83+
args: StartMedicalScribeStreamCommandInput,
84+
cb: (err: any, data?: StartMedicalScribeStreamCommandOutput) => void
85+
): void;
86+
startMedicalScribeStream(
87+
args: StartMedicalScribeStreamCommandInput,
88+
options: __HttpHandlerOptions,
89+
cb: (err: any, data?: StartMedicalScribeStreamCommandOutput) => void
90+
): void;
91+
4692
/**
4793
* @see {@link StartMedicalStreamTranscriptionCommand}
4894
*/
@@ -79,9 +125,10 @@ export interface TranscribeStreaming {
79125
}
80126

81127
/**
82-
* <p>Amazon Transcribe streaming offers three main types of real-time transcription:
83-
* <b>Standard</b>, <b>Medical</b>, and
84-
* <b>Call Analytics</b>.</p>
128+
* <p>Amazon Transcribe streaming offers four main types of real-time transcription:
129+
* <b>Standard</b>, <b>Medical</b>,
130+
* <b>Call Analytics</b>,
131+
* and <b>Health Scribe</b>.</p>
85132
* <ul>
86133
* <li>
87134
* <p>
@@ -101,6 +148,12 @@ export interface TranscribeStreaming {
101148
* center audio on two different channels; if you're looking for insight into customer service calls, use this
102149
* option. Refer to for details.</p>
103150
* </li>
151+
* <li>
152+
* <p>
153+
* <b>HealthScribe transcriptions</b> are designed to
154+
* automatically create clinical notes from patient-clinician conversations using generative AI.
155+
* Refer to [here] for details.</p>
156+
* </li>
104157
* </ul>
105158
* @public
106159
*/

clients/client-transcribe-streaming/src/TranscribeStreamingClient.ts

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,18 @@ import {
6666
HttpAuthSchemeResolvedConfig,
6767
resolveHttpAuthSchemeConfig,
6868
} from "./auth/httpAuthSchemeProvider";
69+
import {
70+
GetMedicalScribeStreamCommandInput,
71+
GetMedicalScribeStreamCommandOutput,
72+
} from "./commands/GetMedicalScribeStreamCommand";
6973
import {
7074
StartCallAnalyticsStreamTranscriptionCommandInput,
7175
StartCallAnalyticsStreamTranscriptionCommandOutput,
7276
} from "./commands/StartCallAnalyticsStreamTranscriptionCommand";
77+
import {
78+
StartMedicalScribeStreamCommandInput,
79+
StartMedicalScribeStreamCommandOutput,
80+
} from "./commands/StartMedicalScribeStreamCommand";
7381
import {
7482
StartMedicalStreamTranscriptionCommandInput,
7583
StartMedicalStreamTranscriptionCommandOutput,
@@ -93,15 +101,19 @@ export { __Client };
93101
* @public
94102
*/
95103
export type ServiceInputTypes =
104+
| GetMedicalScribeStreamCommandInput
96105
| StartCallAnalyticsStreamTranscriptionCommandInput
106+
| StartMedicalScribeStreamCommandInput
97107
| StartMedicalStreamTranscriptionCommandInput
98108
| StartStreamTranscriptionCommandInput;
99109

100110
/**
101111
* @public
102112
*/
103113
export type ServiceOutputTypes =
114+
| GetMedicalScribeStreamCommandOutput
104115
| StartCallAnalyticsStreamTranscriptionCommandOutput
116+
| StartMedicalScribeStreamCommandOutput
105117
| StartMedicalStreamTranscriptionCommandOutput
106118
| StartStreamTranscriptionCommandOutput;
107119

@@ -313,9 +325,10 @@ export type TranscribeStreamingClientResolvedConfigType = __SmithyResolvedConfig
313325
export interface TranscribeStreamingClientResolvedConfig extends TranscribeStreamingClientResolvedConfigType {}
314326

315327
/**
316-
* <p>Amazon Transcribe streaming offers three main types of real-time transcription:
317-
* <b>Standard</b>, <b>Medical</b>, and
318-
* <b>Call Analytics</b>.</p>
328+
* <p>Amazon Transcribe streaming offers four main types of real-time transcription:
329+
* <b>Standard</b>, <b>Medical</b>,
330+
* <b>Call Analytics</b>,
331+
* and <b>Health Scribe</b>.</p>
319332
* <ul>
320333
* <li>
321334
* <p>
@@ -335,6 +348,12 @@ export interface TranscribeStreamingClientResolvedConfig extends TranscribeStrea
335348
* center audio on two different channels; if you're looking for insight into customer service calls, use this
336349
* option. Refer to for details.</p>
337350
* </li>
351+
* <li>
352+
* <p>
353+
* <b>HealthScribe transcriptions</b> are designed to
354+
* automatically create clinical notes from patient-clinician conversations using generative AI.
355+
* Refer to [here] for details.</p>
356+
* </li>
338357
* </ul>
339358
* @public
340359
*/
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { GetMedicalScribeStreamRequest, GetMedicalScribeStreamResponse } from "../models/models_0";
9+
import { de_GetMedicalScribeStreamCommand, se_GetMedicalScribeStreamCommand } from "../protocols/Aws_restJson1";
10+
import {
11+
ServiceInputTypes,
12+
ServiceOutputTypes,
13+
TranscribeStreamingClientResolvedConfig,
14+
} from "../TranscribeStreamingClient";
15+
16+
/**
17+
* @public
18+
*/
19+
export type { __MetadataBearer };
20+
export { $Command };
21+
/**
22+
* @public
23+
*
24+
* The input for {@link GetMedicalScribeStreamCommand}.
25+
*/
26+
export interface GetMedicalScribeStreamCommandInput extends GetMedicalScribeStreamRequest {}
27+
/**
28+
* @public
29+
*
30+
* The output of {@link GetMedicalScribeStreamCommand}.
31+
*/
32+
export interface GetMedicalScribeStreamCommandOutput extends GetMedicalScribeStreamResponse, __MetadataBearer {}
33+
34+
/**
35+
* <p>Provides details about the specified Amazon Web Services HealthScribe streaming session.
36+
* To view the status of the streaming session, check the <code>StreamStatus</code> field in the response. To get the
37+
* details of post-stream analytics, including its status, check the <code>PostStreamAnalyticsResult</code> field in the response.
38+
* </p>
39+
* @example
40+
* Use a bare-bones client and the command you need to make an API call.
41+
* ```javascript
42+
* import { TranscribeStreamingClient, GetMedicalScribeStreamCommand } from "@aws-sdk/client-transcribe-streaming"; // ES Modules import
43+
* // const { TranscribeStreamingClient, GetMedicalScribeStreamCommand } = require("@aws-sdk/client-transcribe-streaming"); // CommonJS import
44+
* const client = new TranscribeStreamingClient(config);
45+
* const input = { // GetMedicalScribeStreamRequest
46+
* SessionId: "STRING_VALUE", // required
47+
* };
48+
* const command = new GetMedicalScribeStreamCommand(input);
49+
* const response = await client.send(command);
50+
* // { // GetMedicalScribeStreamResponse
51+
* // MedicalScribeStreamDetails: { // MedicalScribeStreamDetails
52+
* // SessionId: "STRING_VALUE",
53+
* // StreamCreatedAt: new Date("TIMESTAMP"),
54+
* // StreamEndedAt: new Date("TIMESTAMP"),
55+
* // LanguageCode: "en-US",
56+
* // MediaSampleRateHertz: Number("int"),
57+
* // MediaEncoding: "pcm" || "ogg-opus" || "flac",
58+
* // VocabularyName: "STRING_VALUE",
59+
* // VocabularyFilterName: "STRING_VALUE",
60+
* // VocabularyFilterMethod: "remove" || "mask" || "tag",
61+
* // ResourceAccessRoleArn: "STRING_VALUE",
62+
* // ChannelDefinitions: [ // MedicalScribeChannelDefinitions
63+
* // { // MedicalScribeChannelDefinition
64+
* // ChannelId: Number("int"), // required
65+
* // ParticipantRole: "PATIENT" || "CLINICIAN", // required
66+
* // },
67+
* // ],
68+
* // EncryptionSettings: { // MedicalScribeEncryptionSettings
69+
* // KmsEncryptionContext: { // KMSEncryptionContextMap
70+
* // "<keys>": "STRING_VALUE",
71+
* // },
72+
* // KmsKeyId: "STRING_VALUE", // required
73+
* // },
74+
* // StreamStatus: "IN_PROGRESS" || "PAUSED" || "FAILED" || "COMPLETED",
75+
* // PostStreamAnalyticsSettings: { // MedicalScribePostStreamAnalyticsSettings
76+
* // ClinicalNoteGenerationSettings: { // ClinicalNoteGenerationSettings
77+
* // OutputBucketName: "STRING_VALUE", // required
78+
* // },
79+
* // },
80+
* // PostStreamAnalyticsResult: { // MedicalScribePostStreamAnalyticsResult
81+
* // ClinicalNoteGenerationResult: { // ClinicalNoteGenerationResult
82+
* // ClinicalNoteOutputLocation: "STRING_VALUE",
83+
* // TranscriptOutputLocation: "STRING_VALUE",
84+
* // Status: "IN_PROGRESS" || "FAILED" || "COMPLETED",
85+
* // FailureReason: "STRING_VALUE",
86+
* // },
87+
* // },
88+
* // },
89+
* // };
90+
*
91+
* ```
92+
*
93+
* @param GetMedicalScribeStreamCommandInput - {@link GetMedicalScribeStreamCommandInput}
94+
* @returns {@link GetMedicalScribeStreamCommandOutput}
95+
* @see {@link GetMedicalScribeStreamCommandInput} for command's `input` shape.
96+
* @see {@link GetMedicalScribeStreamCommandOutput} for command's `response` shape.
97+
* @see {@link TranscribeStreamingClientResolvedConfig | config} for TranscribeStreamingClient's `config` shape.
98+
*
99+
* @throws {@link BadRequestException} (client fault)
100+
* <p>One or more arguments to the <code>StartStreamTranscription</code>,
101+
* <code>StartMedicalStreamTranscription</code>, or <code>StartCallAnalyticsStreamTranscription</code>
102+
* operation was not valid. For example, <code>MediaEncoding</code> or <code>LanguageCode</code>
103+
* used unsupported values. Check the specified parameters and try your request again.</p>
104+
*
105+
* @throws {@link InternalFailureException} (server fault)
106+
* <p>A problem occurred while processing the audio. Amazon Transcribe terminated
107+
* processing.</p>
108+
*
109+
* @throws {@link LimitExceededException} (client fault)
110+
* <p>Your client has exceeded one of the Amazon Transcribe limits. This is typically the audio length
111+
* limit. Break your audio stream into smaller chunks and try your request again.</p>
112+
*
113+
* @throws {@link ResourceNotFoundException} (client fault)
114+
* <p>The request references a resource which doesn't exist.</p>
115+
*
116+
* @throws {@link TranscribeStreamingServiceException}
117+
* <p>Base exception class for all service exceptions from TranscribeStreaming service.</p>
118+
*
119+
* @public
120+
*/
121+
export class GetMedicalScribeStreamCommand extends $Command
122+
.classBuilder<
123+
GetMedicalScribeStreamCommandInput,
124+
GetMedicalScribeStreamCommandOutput,
125+
TranscribeStreamingClientResolvedConfig,
126+
ServiceInputTypes,
127+
ServiceOutputTypes
128+
>()
129+
.ep(commonParams)
130+
.m(function (this: any, Command: any, cs: any, config: TranscribeStreamingClientResolvedConfig, o: any) {
131+
return [
132+
getSerdePlugin(config, this.serialize, this.deserialize),
133+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
134+
];
135+
})
136+
.s("Transcribe", "GetMedicalScribeStream", {})
137+
.n("TranscribeStreamingClient", "GetMedicalScribeStreamCommand")
138+
.f(void 0, void 0)
139+
.ser(se_GetMedicalScribeStreamCommand)
140+
.de(de_GetMedicalScribeStreamCommand)
141+
.build() {
142+
/** @internal type navigation helper, not in runtime. */
143+
protected declare static __types: {
144+
api: {
145+
input: GetMedicalScribeStreamRequest;
146+
output: GetMedicalScribeStreamResponse;
147+
};
148+
sdk: {
149+
input: GetMedicalScribeStreamCommandInput;
150+
output: GetMedicalScribeStreamCommandOutput;
151+
};
152+
};
153+
}

0 commit comments

Comments
 (0)