Skip to main content
Gemini 3.5 Transcribe Live converts streaming speech into text. Use it for live captions and dictation. For file transcription over HTTP, see the separate Gemini 3.5 Transcribe API.

WSS

wss://api.modellix.ai/api/v1/live/google/gemini-3.5-transcribe-live
For shared authentication, handshake errors, and close codes, see the Live Overview.

Quick Start

Prepare short mono, 16-bit PCM WAV files at 16 kHz and set MODELLIX_API_KEY. Save the following code as transcribe_live.py and run python transcribe_live.py first.wav second.wav. Each file is sent as a separate utterance on the same connection, using manual endpointing.
Python

Client Messages

Setup

Send setup as the first message, then wait for setupComplete. The following fields belong inside setup.
string
Optional. The URL selects the model, and Modellix replaces this field with the upstream model resource.
string[]
required
Set to ["TEXT"] for this model.
object
required
Enables transcription. Use {} for automatic language detection and the default transcription mode, or configure the fields below.
string[]
default:[]
BCP-47 language hints, such as ["cmn-Hans-CN", "en-US"]. Omit or use [] to detect languages automatically, including mixed-language speech.
string[]
Optional terms or phrases to help recognize names and specialist vocabulary. Supply up to 1,000 entries; Google recommends keeping the list to about 100 relevant entries for best results.
string
default:"VERBATIM"
Allowed values: VERBATIM, SMART. VERBATIM preserves spoken words and fillers. SMART is experimental and cleans up disfluencies, corrections, and formatting. For SMART, use manual endpointing as in the quick start so natural pauses do not split a thought.
boolean
default:false
Allowed values: true, false. Set to true for manual endpointing with activityStart and activityEnd. Leave automatic voice activity detection (VAD) enabled to let the model detect speech boundaries.

Realtime Input

After setupComplete, send audio and activity signals inside realtimeInput.
object
Audio chunk containing both fields below. Send chunks of about 100 ms at the audio’s playback rate.
object
Send {} before an utterance when automatic VAD is disabled.
object
Send {} after that utterance’s audio when automatic VAD is disabled, then wait for generationComplete before starting the next utterance in the example.
boolean
With automatic VAD enabled, send true when the audio stream ends to flush buffered audio. Omit this signal during the manual endpointing flow above.

Server Messages

Server messages are forwarded unchanged. A message may contain transcription content and usageMetadata together.
object
The setup was accepted. You can now send audio.
string
A provisional transcript that may change. Replace the current interim preview rather than appending every update.
string
The finalized transcript for an utterance. Append it to your transcript and clear the interim preview.
object
Token counts for the utterance. Audio input is reported in promptTokensDetails with modality AUDIO; text output is reported in candidatesTokensDetails with modality TEXT. Use the latest report for each utterance. Do not sum multiple reports for the same utterance or treat them as session-wide totals.
boolean
true marks the utterance’s completion. This model’s settlement boundary is generationComplete; Gemini 3.8 Live continues to use turnComplete.
object
Speech activity metadata. A standalone activity notification does not start another billable utterance.

Billing

Each completed utterance produces a request record. Charges use the upstream audio input and text output tokens; final transcript tokens are text output even though the transcript is returned under inputTranscription. Interim previews are not billed as additional text. If the connection ends before generationComplete, Modellix settles any usage already received for the incomplete utterance. No usage means no token charge. You can inspect usage and the charged amount in the console’s Live request records.

Sessions and Limits

  • Sessions support up to 10 minutes of continuous audio. The gateway’s longer connection limit does not extend the model limit.
  • Input is audio only; output is text only.
  • Speaker diarization and word-level timestamps are not supported in Live transcription.
See the Google Cloud model documentation for supported languages and model capabilities.