word_timestamps: true is set, the server performs forced alignment on
each generated audio chunk and sends a word_timestamps message shortly after
the corresponding audio. Useful for barge-in handling (“which word was the
agent on when the user interrupted?”), subtitle synchronization, and lip-sync.
Timestamp frames are delivered after their corresponding audio frames, so
clients do not need to hold audio playback while waiting for alignment data.
Streaming with word timestamps
- Python
- JavaScript
- Java
- WebSocket (raw)
The timestamp payload
Eachword_timestamps message carries the alignments for one audio chunk:
Timestamps are relative to the start of their chunk — to place words on a
global timeline, accumulate the duration of previous chunks. Character
offsets are not guaranteed to index the original request when normalization
or a pronunciation dictionary rewrites the text.
Where timestamps are available
LiveKit uses these alignments natively for transcript sync — see the
LiveKit integration.