TranscribeStreamingClient.start_medical_stream_transcription
rboto-transcribe-streaming==0.4.0 · Service index · Types
Model summary (excerpt): Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to Amazon Transcribe Medical and the transcription results are streamed to your application. The following parameters are required: language-code media-encoding sample-rate For more information on streaming with Amazon Transcribe Medical, see Transcribing streaming audio .
Install and imports
from rboto import TranscribeStreamingClient
from collections.abc import AsyncIterator
from rboto_transcribe_streaming.types import (
AudioStream,
LanguageCode,
MediaEncoding,
MedicalContentIdentificationType,
Specialty,
StartMedicalStreamTranscriptionOutput,
Type,
)
Signature
async def start_medical_stream_transcription(
*,
language_code: LanguageCode,
media_sample_rate_hertz: int,
media_encoding: MediaEncoding,
specialty: Specialty,
type: Type,
audio_stream: AsyncIterator[AudioStream],
vocabulary_name: str | None = None,
show_speaker_label: bool | None = None,
session_id: str | None = None,
enable_channel_identification: bool | None = None,
number_of_channels: int | None = None,
content_identification_type: MedicalContentIdentificationType | None = None,
) -> StartMedicalStreamTranscriptionOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
language_code |
Yes | Specify the language code that represents the language spoken in your audio. Amazon Transcribe Medical only supports US English ( en-US ). |
media_sample_rate_hertz |
Yes | The sample rate of the input audio (in hertz). Amazon Transcribe Medical supports a range from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio. |
media_encoding |
Yes | Specify the encoding used for the input audio. Supported formats are: FLAC OPUS-encoded audio in an Ogg container PCM (only signed 16-bit little-endian audio formats, which does not include WAV) For more information, see Media formats . |
specialty |
Yes | Specify the medical specialty contained in your audio. |
type |
Yes | Specify the type of input audio. For example, choose DICTATION for a provider dictating patient notes and CONVERSATION for a dialogue between a patient and a medical professional. |
audio_stream |
Yes | |
vocabulary_name |
No | Specify the name of the custom vocabulary that you want to use when processing your transcription. Note that vocabulary names are case sensitive. |
show_speaker_label |
No | Enables speaker partitioning (diarization) in your transcription output. Speaker partitioning labels the speech from individual speakers in your media file. For more information, see Partitioning speakers (diarization) . |
session_id |
No | Specify a name for your transcription session. If you don't include this parameter in your request, Amazon Transcribe Medical generates an ID and returns it in the response. |
enable_channel_identification |
No | Enables channel identification in multi-channel audio. Channel identification transcribes the audio on each channel independently, then appends the output for each channel into one transcript. If you have multi-channel audio and do not enable channel identification, your audio is transcribed in a continuous manner and your transcript is not separated by channel. If you include... |
number_of_channels |
No | Specify the number of channels in your audio stream. This value must be 2 , as only two channels are supported. If your audio doesn't contain multiple channels, do not include this parameter in your request. If you include NumberOfChannels in your request, you must also include EnableChannelIdentification . |
content_identification_type |
No | Labels all personal health information (PHI) identified in your transcript. Content identification is performed at the segment level; PHI is flagged upon complete transcription of an audio segment. For more information, see Identifying personal health information (PHI) in a transcription . |
Output
StartMedicalStreamTranscriptionOutput.
Typed response mapping, accessed as response["field"].
| Field | Type | Presence | References |
|---|---|---|---|
request_id |
str | None |
Always present | — |
language_code |
LanguageCodeOutput | None |
Always present | LanguageCodeOutput |
media_sample_rate_hertz |
int | None |
Always present | — |
media_encoding |
MediaEncodingOutput | None |
Always present | MediaEncodingOutput |
vocabulary_name |
str | None |
Always present | — |
specialty |
SpecialtyOutput | None |
Always present | SpecialtyOutput |
type |
TypeOutput | None |
Always present | TypeOutput |
show_speaker_label |
bool |
Always present | — |
session_id |
str | None |
Always present | — |
transcript_result_stream |
AsyncIterator[MedicalTranscriptResultStream] |
Always present | MedicalTranscriptResultStream |
enable_channel_identification |
bool |
Always present | — |
number_of_channels |
int | None |
Always present | — |
content_identification_type |
MedicalContentIdentificationTypeOutput | None |
Always present | MedicalContentIdentificationTypeOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
AudioStream, LanguageCode, MediaEncoding, MedicalContentIdentificationType, Specialty, StartMedicalStreamTranscriptionOutput, Type
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
Output streams: StartMedicalStreamTranscriptionOutput.
Consume with async for. Do not reuse a consumed stream.
Input event streams accept the declared AsyncIterator of typed events.
Errors
Import from rboto_transcribe_streaming.exceptions:
BadRequestError, ConflictError, InternalFailureError, LimitExceededError, ServiceUnavailableError.
Stream decoding may also raise the linked modeled event errors.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.