Gemini Live API: CLOSING detected immediately after starting audio transmission following setupComplete

I am developing a browser-based voice application for phone-handling training.

I would like to inquire about items that can be checked without running additional paid reproductions regarding an issue where, after receiving setupComplete and immediately after starting audio transmission, a pre-transmission check detected that the WebSocket state was CLOSING, causing the app to automatically stop before receiving any AI audio.

Connection parameters:
Below are the settings confirmed from the saved code of that version. Identity with the exact assets loaded by Chrome at that time cannot be verified.

・Live model specification: models/gemini-3.8-live
・Version of Live connection and short-term token issuance API: v1beta
・No SDK is used on this connection path; it uses Node-side HTTP fetch and standard browser WebSocket
・Short-term token retrieved via the server is used for the browser connection
・Token issuance request:
uses: 1
newSessionExpireTime: 30 seconds after now at the time of issuance
expireTime: 90 seconds after now
bidiGenerateContentSetup: Implementation specifies the same settings as the setup sent to the browser

Setup configuration:
・generationConfig.responseModalities: [“AUDIO”]
・generationConfig.maxOutputTokens: 1024
・inputAudioTranscription: {wordTimestamp: true, mode: “VERBATIM”}
・outputAudioTranscription: {wordTimestamp: true, mode: “VERBATIM”}
・systemInstruction: Configured (the actual text of the training instructions is not attached)

Audio transmission:
・Float32 input is converted to 16,000 Hz signed PCM16 little-endian and Base64-encoded
・Transmitted payload:
realtimeInput.audio.mimeType = “audio/pcm;rate=16000”
realtimeInput.audio.data = Base64-encoded PCM
・Implementation sends realtimeInput.audioStreamEnd = true upon completion
・The actual microphone sample rate and channel count at the time were not recorded

Representative existing observation (internal designation: Run #27):
Below is the diagnostic log provided by the user. Timestamps are relative, with 0 ms representing the start of in-app diagnostics, not network wire timestamps.

・After 2,332 ms: setupComplete received
・After 2,726 ms: First audio transmission queued
・After 2,856 ms: CLOSING detected during the pre-transmission check of the 50th transmission
・This 50th transmission was not sent, and the app transitioned to shutdown handling, followed by cleanup/release processing
・For the preceding 49 transmissions, socket.send() returned without exception, but there is no proof of receipt by the server
・0 messages received for AI audio, serverContent, and usageMetadata respectively
・According to user reports, they did not press the stop or release buttons

In Run #28, an automatic shutdown following a CLOSING detection before transmission was also observed.
In Run #26, a transmission failure was observed, but the connection state at that point was not recorded.

The disconnect code, original close reason, request ID, absolute start time, and Chrome version at that time were not recorded.
From these observations alone, it is not possible to determine which party initiated the closure or the root cause.
Browser network logs were not preserved, and deleted audio/transcript text cannot be reproduced.

Since then, diagnostics for connection states, disconnect events, etc., have been enhanced within limits that do not delay shutdown.
A limited 4-item offline check has been completed for these changes, but no live connection has been made with the diagnostically enhanced version.

Questions / Items I would like to verify:

  1. Regarding the saved configuration above, are there any inconsistencies with public specifications, or known constraints/checkpoints that could lead to rejection or termination during the input receipt phase after setupComplete?
  2. If the absolute start time and request ID were not recorded, what is the minimum information required to determine whether an investigation is possible on Google’s end? If additional information is needed, could you direct me to a secure private contact channel and list the required items?
  3. Are there any verification steps that can be carried out using only the existing configuration and logs, without running new paid reproductions?

Credentials, WebSocket URLs, audio, conversation transcripts, raw exception messages, and HAR files are omitted.
Please advise on the scope of support available, including whether internal logs can be checked.

Hello @3yayayayayyayayayya ,

This happens because word-level timestamps (wordTimestamp: true) are not supported over the Live API, which only emits utterance-level transcription events.

  1. Although wordTimestamp appears in the shared AudioTranscriptionConfig schema, word-level timestamps are not supported over the Live API (Live API Audio Transcription — Limitations), and outputAudioTranscription only takes {} (Audio transcriptions).
  2. In addition, audio should be sent in ~100 ms chunks (1,024–2,048 frames) instead of ~2.6 ms bursts (Audio format), and expireTime (default 30m) limits active session duration (Ephemeral tokens).
  3. Offline verification steps: In your code, remove wordTimestamp: true from setup and bidiGenerateContentSetup, set outputAudioTranscription to {}, buffer 16 kHz PCM into ~100 ms chunks, increase expireTime, and log CloseEvent.code and CloseEvent.reason in ws.onclose.