Realtime event reference
Reference of the events received from the Realtime Speech to Text API
Reference · Lists all events sent to and received from the Realtime Speech to Text WebSocket API.
Review the API reference for the Realtime Speech to Text API for more information on the API and its options.
committed_transcript is the stable, final event for each segment. The public API does not emit a separate final_transcript event.
Sent events
With Scribe v3 Live, the first input_audio_chunk of a session can also include a keyterm library.
Received events
Language code
Set include_language_detection=true in the query parameters to receive the language of the speech on partial_transcript and committed_transcript_with_timestamps events as language_code.
- On
partial_transcript,language_codeis always present and isnulluntil the in-progress segment has enough speech to tell the language (about four words, or eight characters for languages written without spaces, such as Chinese, Japanese and Thai) and the same language has been seen on consecutive partials. Very short segments, such as a single word, may staynull, and a partial too short to tell resets the count of consecutive partials. Once set, it only changes after the new language has been seen on consecutive partials, so a single odd partial does not flip it. - Partials with no spoken text, such as only punctuation, have
language_code: null. language_codeoncommitted_transcript_with_timestampsis the final answer for the segment. If it differs from the last partial, use the committed value. It is sent aftercommitted_transcript, so show the partial’s value until it arrives.- If you pass a
language_codeorsecondary_languageswhen connecting, the language comes from the model’s recognition within those languages. Without a hint, it is detected from the transcript text. - Without
include_language_detection=true,partial_transcriptevents have nolanguage_codefield.
Error handling
If an error occurs, an error message will be returned before the WebSocket connection is closed.