Stream audio and receive real-time transcription results. Fast, cost-effective streaming transcription available in three variants:Documentation Index
Fetch the complete documentation index at: https://assemblyai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
- Universal-Streaming English — the fastest real-time English transcription
- Universal-Streaming Multilingual — multilingual support (English, Spanish, German, French, Portuguese, and Italian) at the same speed and price
- Whisper-Streaming — open-source Whisper powered by AssemblyAI’s infrastructure with 99+ languages
To use the EU server for Streaming STT, replace
streaming.assemblyai.com with streaming.eu.assemblyai.com.WSSwss://streaming.assemblyai.com/v3/ws
Authentication
Authenticate by passing your API key in theAuthorization header. Alternatively, generate a temporary token and pass it via the token query parameter.
Use your API key for authentication, or alternatively generate a temporary token and pass it via the
token query parameter.Query parameters
The speech model used for your Streaming session. Allowed values:
universal-streaming-english, universal-streaming-multilingual, whisper-rt.Encoding of the audio stream. Allowed values:
pcm_s16le, pcm_mulaw.Whether to return formatted final transcripts. Allowed values:
true, false.Optional time in seconds of inactivity before session is terminated (integer, minimum 5, maximum 3600). If not set, no inactivity timeout is applied.
A list of words and phrases to improve recognition accuracy for. See Keyterms Prompting for more details.
Whether to detect the language and return language metadata on utterances and final turns. Only available for the multilingual model. Allowed values:
true, false.The maximum amount of silence in milliseconds allowed in a turn before end of turn is triggered. See Turn Detection for configuration details.
The minimum amount of silence in milliseconds required to detect end of turn when confident. See Turn Detection for configuration details.
Sample rate of the audio stream.
Whether to enable Streaming Speaker Diarization. When enabled, each Turn event will include a
speaker_label field and each final word in the words array will include a speaker field for word-level speaker attribution. Allowed values: true, false.The maximum number of speakers expected in the audio stream (integer, 1-10). Setting this can improve speaker label accuracy when you know the number of speakers in advance. Only used when
speaker_labels is enabled. See Streaming Diarization for more details.API token for authentication (if using a temporary token).
The confidence threshold (0.0 to 1.0) for classifying audio frames as silence. Frames with VAD confidence below this value are considered silent. Increase for noisy environments to reduce false speech detection.
The confidence threshold (0.0 to 1.0) to use when determining if the end of a turn has been reached. See Turn Detection for configuration details.Note: This parameter is only supported for the Universal-streaming model.
Enable domain-specific transcription models to improve accuracy for specialized terminology. Set to
"medical-v1" to enable Medical Mode for improved accuracy of medical terms such as medications, procedures, conditions, and dosages. Supported languages: English (en), Spanish (es), German (de), French (fr). If used with an unsupported language, the parameter is ignored and a warning is returned. Allowed values: medical-v1.The language of your audio stream. Deprecated. Allowed values:
en, multi.JSON-stringified LLM Gateway configuration that processes each finalized turn. Follows the same interface as the Chat Completions endpoint and accepts
model, messages, tools, tool_choice, post_processing_steps, and max_tokens. See Apply LLM Gateway to Streaming for the full schema and examples.Messages sent by the client
Audio Data Chunk
Client sends audio data as raw binary. Send audio data chunks for transcription. The payload must be of type bytes and contain audio data between 50ms and 1000ms in length. When streaming from a pre-recorded file, pace the chunks at approximately real-time (for example, sleep for the chunk’s duration between sends) — sending chunks in a tight loop can produce inconsistent Turn messages. The payload is raw binary audio data (application/octet-stream), not JSON.
Update Streaming Configuration
Client message to update streaming configuration parameters during an active session.Allowed values:
UpdateConfiguration.Confidence threshold (0-1) for detecting end of turn. See Turn Detection for configuration details.
Minimum silence duration in ms when confident about end of turn. See Turn Detection for configuration details.
The maximum amount of silence allowed in a turn before end of turn is triggered. See Turn Detection for configuration details.
Force Endpoint
Client message to manually force an endpoint in the transcription.Allowed values:
ForceEndpoint.Terminate Session (Client Initiated)
Client message to gracefully terminate the streaming session.Allowed values:
Terminate.Keep Alive
Client message to reset the inactivity timeout timer. This is not necessary by default — sessions remain open until explicitly terminated or until the 3-hour maximum session duration is reached. This message is only needed if you have setinactivity_timeout and want to keep the session open during periods where no audio is being sent.
Allowed values:
KeepAlive.Messages received from the server
Session Begins Confirmation
Server message indicating the streaming session has successfully started.Identifies the type of the message. Allowed values:
Begin.Unique identifier for the streaming session.
Unix timestamp indicating when the session will expire.
Formatted Turn Result
Server message containing a formatted turn-based transcription result.Allowed values:
Turn.Order of this turn in the conversation.
Whether this turn has been formatted.
Whether this marks the end of a turn. See Turn Detection for more information.
Transcript of all finalized words in the turn.
Finalized text at the moment a pause in speech is detected. Empty string on all other Turn messages. A turn can contain multiple utterances.
The language of the turn. Only populated when language detection is enabled and an utterance is complete or turn is final.
The confidence score for the detected language, between 0 (low confidence) and 1 (high confidence). Only populated when language detection is enabled and an utterance is complete or turn is final.
The speaker label for this turn (e.g.
A, B). Only present when speaker_labels is enabled. Short turns with less than approximately 1 second of audio will have the label UNKNOWN. See Streaming Diarization for more details.The confidence score that this is the end of a turn, between 0.0 (low confidence) and 1.0 (high confidence). See Turn Detection for more information.
Array of word-level details for this turn.
Session Terminated (Server Confirmation)
Server message confirming session termination with session statistics.Indicates the session has been terminated. Allowed values:
Termination.Duration of the audio in seconds.
Duration of the session in seconds.
LLM Gateway Response
Server message containing an LLM Gateway response for a finalized turn.Identifies the type of the message. Allowed values:
LLMGatewayResponse.The order of the finalized turn that triggered the LLM Gateway call.
The finalized turn transcript that triggered the LLM Gateway call.
The chat completions response from the LLM Gateway.