Set streaming STT endpointing silence
Set streaming STT endpointing silence
On streaming STT, endpointing is the silence duration in milliseconds before the server fires speech_final=true (speaker stopped). Default is 400. Range is 0–5000. Set 0 to fire on any VAD silence boundary. Base connect loop: Stream speech to text over WebSocket.
Add the query param
wss://api.x.ai/v1/stt?sample_rate=16000&encoding=pcm&interim_results=true&endpointing=800
| Value | Effect |
|---|---|
0 |
Fire speech_final on any VAD silence boundary (no delay). |
400 |
Default silence wait before utterance-final. |
800–1500 |
More tolerant of brief pauses inside a sentence. |
up to 5000 |
Maximum documented silence wait. |
endpointing is independent of Smart Turn. For ML end-of-turn scoring on top of VAD silence, see Enable Smart Turn on streaming speech-to-text and Set Smart Turn timeout on streaming STT.
Proxy the WebSocket through your backend so the API key stays off the client.
Pitfalls
- Batch REST multipart (
POST /v1/stt) has noendpointingfield. Streaming WebSocket only. vad_thresholdfilters which chunks count as speech; it does not changespeech_finaltiming. Docs default stream VAD to0.08.- Very low
endpointingcan split numbers and mid-clause pauses into separate utterances. - Console API credits are separate from SuperGrok's weekly pool on grok.com.
- Never put the API key in client-side WebSocket code; proxy through your backend.