StartMedicalScribeListeningSession - Amazon Connect Health

StartMedicalScribeListeningSession

Starts a new Medical Scribe listening session for real-time audio transcription

Request Syntax

POST /medical-scribe-stream/ HTTP/1.1 x-amzn-medscribe-session-id: sessionId x-amzn-medscribe-domain-id: domainId x-amzn-medscribe-subscription-id: subscriptionId x-amzn-medscribe-language-code: languageCode x-amzn-medscribe-sample-rate: mediaSampleRateHertz x-amzn-medscribe-media-encoding: mediaEncoding Content-type: application/json { "audioEvent": { "audioChunk": blob }, "configurationEvent": { "channelDefinitions": [ { "channelId": number, "participantRole": "string" } ], "encounterContext": { "unstructuredContext": "string" }, "postStreamActionSettings": { "clinicalNoteGenerationSettings": { "noteTemplateSettings": { ... } }, "outputS3Uri": "string" } }, "sessionControlEvent": { "type": "string" } }

URI Request Parameters

The request uses the following URI parameters.

domainId

The Domain identifier

Length Constraints: Minimum length of 20. Maximum length of 25.

Pattern: (hai-|dom-)[a-z0-9]+

Required: Yes

languageCode

The Language Code for the audio in the session

Valid Values: en-US

Required: Yes

mediaEncoding

The encoding for the input audio

Valid Values: pcm | flac

Required: Yes

mediaSampleRateHertz

The sample rate of the input audio

Valid Range: Minimum value of 8000. Maximum value of 48000.

Required: Yes

sessionId

The Session identifier

Length Constraints: Fixed length of 36.

Pattern: .*[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.*

Required: Yes

subscriptionId

The Subscription identifier

Length Constraints: Fixed length of 25.

Pattern: sub-[a-zA-Z0-9]{21}

Required: Yes

Request Body

The request accepts the following data in JSON format.

Response Syntax

HTTP/1.1 200 x-amzn-medscribe-session-id: sessionId x-amzn-medscribe-domain-id: domainId x-amzn-medscribe-subscription-id: subscriptionId x-amzn-request-id: requestId x-amzn-medscribe-language-code: languageCode x-amzn-medscribe-sample-rate: mediaSampleRateHertz x-amzn-medscribe-media-encoding: mediaEncoding Content-type: application/json { "internalFailureException": { }, "transcriptEvent": { "transcriptSegment": { "audioBeginOffset": number, "audioEndOffset": number, "channelId": "string", "content": "string", "isPartial": boolean, "segmentId": "string" } }, "validationException": { } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

domainId

The Domain identifier

Length Constraints: Minimum length of 20. Maximum length of 25.

Pattern: (hai-|dom-)[a-z0-9]+

languageCode

The Language Code for the audio in the session

Valid Values: en-US

mediaEncoding

The encoding for the input audio

Valid Values: pcm | flac

mediaSampleRateHertz

The sample rate of the input audio

Valid Range: Minimum value of 8000. Maximum value of 48000.

requestId

The Request identifier

Length Constraints: Minimum length of 1. Maximum length of 256.

sessionId

The Session identifier

Length Constraints: Fixed length of 36.

Pattern: .*[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.*

subscriptionId

The Subscription identifier

Length Constraints: Fixed length of 25.

Pattern: sub-[a-zA-Z0-9]{21}

The following data is returned in JSON format by the service.

internalFailureException

Type: Exception

HTTP Status Code: 500

transcriptEvent

Type: MedicalScribeTranscriptEvent object

validationException

Type: Exception

HTTP Status Code: 400

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

This error is thrown when the client does not supply proper credentials to the API.

HTTP Status Code: 401

InternalServerException

This error is thrown when a transient error causes our API to fail.

HTTP Status Code: 500

ResourceNotFoundException

This error is thrown when the requested resource is not found.

HTTP Status Code: 404

ServiceQuotaExceededException

The request exceeds a service quota.

HTTP Status Code: 402

ThrottlingException

This error is thrown when the client exceeds the allowed request rate.

HTTP Status Code: 429

ValidationException

This error is thrown when the client supplies invalid input to the API.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: