Handshake fails with FailedPrecondition (session is not accepting new speech sessions) | The Dictation session is RUNNING, COMPLETED, or otherwise not ready for a new speech session. | Open /ws/transcribe only when the session is READY or IDLE. Wait until the previous speech session on that transcription_session_id has finished, you sent AUDIO_END, received EOF, and the session returned to READY or IDLE, before you connect again. |
| 401 on handshake or immediate disconnect | The browser Sec-WebSocket-Protocol string is wrong, or the token and session ID are in the wrong order. | Use SukiAmbientAuth,<sdp_suki_token>,<transcription_session_id>, not SukiTranscriptionAuth. Put the token before the session ID. Only the session ID value differs from Ambient (transcription_session_id vs ambient_session_id). |
| Server returns JSON parse errors (for example, invalid character or null byte) | The WebSocket received a binary frame, a non-JSON payload, or multiple JSON objects in a single frame. | Send one UTF-8 JSON object per WebSocket text frame. Do not send binary frames or concatenate multiple JSON objects. |
| Audio is ignored or transcription is incorrect | The payload used the ambient data field, non-PCM bytes, hexadecimal or URL-safe Base64, or WAV headers treated as PCM. | Encode raw PCM_S16LE with standard Base64 (RFC 4648) and send it in audioData. Strip the WAV header (for example 44 bytes) or decode to raw PCM before encoding. |
| The session never completes | The server never received the end-of-audio message. | After the last AUDIO chunk, send {"type":"EVENT","event":"AUDIO_END"}. |
Partial UI flicker or empty words | Every inbound frame is treated as committed text, or words is read from partial frames. | Show is_final: false frames as draft text. Use words on is_final: true frames for word-level or speaker-aware display. Do not treat transcript_id as a stable key for the same utterance across partials. |
| No final transcript is available, or the session is left open | Closing the WebSocket does not end the Dictation session or guarantee a final transcript. | After you finish reading frames, call End Dictation session to close the session and retrieve results. |