Transcript errors
Are you joining transcripts correctly?
Are you joining transcripts correctly?
For the final transcript, take the Within a turn,
transcript field from each turn.end event, one per completed turn. Add a space between turns when you assemble the full transcript. Turn transcripts don’t include separator spaces, so joining them directly runs words together.transcript is cumulative. Each turn.update, turn.eager_end, and turn.end event already holds the full text of the turn so far. So if you join the transcripts from turn.update and turn.eager_end events, you repeat parts of the transcript. This is a common source of duplicated text. Treat these events as updates to the turn state, not transcript chunks.Read only turn.end for the final transcript.Did you drain all events?
Did you drain all events?
When you’re done sending audio for a session, send
{"type": "close"}. The model then flushes any buffered audio and sends the remaining events. Once the model is done, the server closes the socket for you.The server buffers some audio to improve transcription accuracy. If you don’t send the close command, or you stop reading messages early, that buffered audio isn’t processed. That’s fine if you don’t care about the last second of audio.Are you using a supported language?
Are you using a supported language?
ink-2 supports English, French, Hindi, Japanese, and Spanish. ink-preview supports 44 languages. Both detect the language automatically. With ink-preview, you can also pass language hints to steer it toward the languages you expect.Did you pass the right language hints?
Did you pass the right language hints?
With
ink-preview, we recommend passing language hints whenever you know which languages to expect. Hints improve accuracy, especially on short or noisy audio and on closely related languages. They also keep the transcript in the right script. Only ink-preview takes hints. Other models return an error if you pass them.Are you using the right sample rate and encoding?
Are you using the right sample rate and encoding?
The model decodes your bytes using the If the playback sounds wrong, your
encoding and sample_rate you declared in the connection. If these parameters are wrong, the server might not return an error.To check them, save your audio data and play it back with ffplay:encoding or sample_rate doesn’t match the data. The difference is usually obvious. Correct the values until your audio plays back cleanly, then send those same values to the API.See Audio Input for help finding the right parameters.High latency
Did you stop sending audio?
Did you stop sending audio?
The API expects a continuous stream of audio, so send silence (all zeros) while your audio input is muted.If you stop sending audio, the server waits for more audio chunks to arrive rather than assuming the user is silent. This is normally what you want, because it handles network lag.
Are you using the right endpoint?
Are you using the right endpoint?
Consider switching to Realtime STT (Manual) if you’re building a push-to-talk app, where the user holds a button to speak. It also fits when you want to flush the transcript at fixed points, as in certain evals.Turn detection adds some delay to the final transcript in
turn.end, on the order of half a second. If your setup allows it, use Realtime STT (Manual) and send "finalize" when the user is done speaking. This can cut out the latency that turn detection adds.Server errors
Are you chunking audio?
Are you chunking audio?
The realtime WebSocket endpoints expect audio to arrive at roughly the rate it’s spoken. If you push a large batch of audio into the socket at once, you can overload the server-side buffer. This may show up as an internal server error.Stream audio in small chunks of about 100 ms each, and pace them to realtime. On average, send one second of audio per second of wall-clock time. Here’s a JavaScript example.To transcribe a complete file in one go, use Batch STT, which takes the whole file in a single request.