Handle overlapping speech without mixing turns.
1. Barge-in
When the user interrupts, stop current playback and cancel or invalidate pending synthesis. A server cancellation alone does not empty the local audio queue.
2. Turn identity
Tag transcription, model and synthesis work with a turn ID. Discard late results from superseded turns rather than appending them to the new answer.
3. Conversation repair
Allow “that is not what I meant” and explicit correction. Preserve enough context to resolve the correction without treating all prior model statements as facts.
Worked scenario
Turn one is still synthesizing when turn two begins. The late audio from turn one must never play after the new answer.
Apply it
Simulate delayed STT, model and TTS results across an interruption and verify stale work is discarded.
Check your understanding
No output from a superseded turn can re-enter active playback. Explain the decision and show evidence from your implementation or design. If you cannot demonstrate it yet, revisit the relevant section before continuing.