Model and Inference EngineeringMultimodal evidence and voiceStaff
What can playback acknowledgments prove when a voice confirmation is cleared before the caller hears it?
By Amit Kumar2 min readWorked answer includedReviewed 28 Sept 2026
The question
Interview question
The server logs a spoken confirmation after generating audio, but a caller interruption clears queued playback. Design generated, sent, acknowledged and cleared segment states, interpret returned marks under the provider protocol and repair the next turn. Keep financial-effect truth separate from whether its status message was delivered.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
The log may mean only that text-to-speech (TTS) synthesis produced audio or our server sent it. On a bidirectional phone stream, outgoing media can be queued for playback. A caller interrupts, the application clears buffered media, and the sentence that contained the amount or next step never plays. If the conversation transcript still records the whole generated sentence as something the caller heard, the next model turn can assume a confirmation that never happened.
Twilio's Media Streams protocol is a concrete example. Outbound media is buffered. A server can send a named mark and receive a matching mark after playback. It can also send clear, which empties the buffer and returns marks for media that will not play. So a returned mark by itself needs interpretation against the clear and stream state. A TTS-completed event is even farther from proof of playback. The provider's playback acknowledgment still cannot prove a human listened or understood, but it establishes a better transport boundary.
If a playback mark and clear race, preserve uncertainty about the affected segment unless the provider’s ordering evidence resolves it. A returned mark for cleared media cannot be relabeled as proof the caller heard the sentence. Even confirmed playback is not proof of attention or understanding.
I would track four states for each response segment: generated text, audio sent, playback acknowledged, and cleared or interrupted. Keep the exact text range associated with each segment and its stream ID. On barge-in, stop sending old audio, clear the queue, reconcile outstanding marks, and rebuild the model's conversational state from the portion plausibly played. Do not append the whole planned response to the audible history. If the cut falls inside a word or a critical amount, treat it as uncertain and repeat the important fact plainly before acting on any supposed acknowledgment.
There is a useful interview follow-up here. If the agent says “your refund is complete” and gets interrupted, should it issue the refund again to make the message true? No. The payment's durable action state and the caller's hearing state are separate. Query the action state, then repair the communication. The screen shows $1.50. Why did the voice agent say $150? deals with a wrong amount in the audio text before TTS. This one can have perfectly correct words and still fail at delivery.
Related questions
Keep practising model and inference engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux