Skip to content

MedicalScribeAudioEvent

Source code in docs_src/capo_transcribe_streaming/types/medical_scribe_audio_event.py
class MedicalScribeAudioEvent(TypedDict, closed=True):
    audio_chunk: "capo_transcribe_streaming.types.audio_chunk.AudioChunk"
    """<p> An audio blob containing the next segment of audio from your application, with a maximum duration of 1 second. The maximum size in bytes varies based on audio properties. </p> <p>Find recommended size in <a href="https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html#best-practices">Transcribing streaming best practices</a>. </p> <p> Size calculation: <code>Duration (s) * Sample Rate (Hz) * Number of Channels * 2 (Bytes per Sample)</code> </p> <p> For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be <code>1 * 16000 * 2 * 2 = 64000 bytes</code>. </p> <p> For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be <code>1 * 8000 * 1 * 2 = 16000 bytes</code>. </p>"""

audio_chunk instance-attribute

audio_chunk: AudioChunk

An audio blob containing the next segment of audio from your application, with a maximum duration of 1 second. The maximum size in bytes varies based on audio properties.

Find recommended size in Transcribing streaming best practices.

Size calculation: Duration (s) * Sample Rate (Hz) * Number of Channels * 2 (Bytes per Sample)

For example, a 1-second chunk of 16 kHz, 2-channel, 16-bit audio would be 1 * 16000 * 2 * 2 = 64000 bytes.

For 8 kHz, 1-channel, 16-bit audio, a 1-second chunk would be 1 * 8000 * 1 * 2 = 16000 bytes.