A real-time voice agent receives audio in pieces. An interim transcript is a changing hypothesis, while a completed turn is a candidate for intent extraction. Prompt the model to treat interim words as context for listening, not as authority for an effectful tool call. The turn controller owns endpoint detection and can wait through a short pause; the prompt describes how to respond once the controller marks a turn ready. Preserve a timestamped record of the final recognized phrase and any low-confidence span. For short ambiguous commands, ask a targeted clarification instead of guessing from the first few syllables. A recognized transcript is still not proof of account identity or tool permission.
Voice prompts: do not commit an action from interim speech
Operational case
A library patron says, 'Renew BK-412—no, BK-421, if it is still available.' The recognizer briefly shows 'Renew BK-412' as an interim hypothesis. Calling the renewal tool at that moment would affect the wrong item. The final utterance corrects the identifier and adds a condition. The agent extracts BK-421, checks the patron's account scope and renewal eligibility, then states the item title before an effectful action. If café noise makes the final digit unclear, it asks which code the patron meant. It does not treat a moment of silence after 'BK-412' as proof that the user finished speaking.
Interim at 00:02.1: Renew BK-412 -> listen only.
Final at 00:03.8: No, BK-421, if available.
Intent: conditional renewal of BK-421; verify owner and eligibility.
Unclear final digit -> ask for code; no renewal call.Performance and operating cost
With U audio updates per turn, maintaining the latest interim text is O(U) event work and O(L) space for the retained transcript length L. A longer endpoint wait raises response latency but reduces premature cuts; a shorter wait does the opposite. Evaluate pauses, self-corrections, background speech, and code digits rather than tuning to one clean recording. Send the smallest useful final-turn record to the model instead of every partial hypothesis. The application should reject a tool call that lacks a finalized utterance and a verified account scope, regardless of the model's wording.
Common Mistakes
- Do not turn an interim transcript into a renewal request.
- Do not assume a silence threshold always marks the end of a thought.
- Do not use recognized text as account authorization.
Connected lessons
- Prompt engineering applications
- Prompt Engineering
- Audio prompts: preserve speakers, timestamps, and uncertain words
- Audio prompts: mark overlapping speech before assigning speakers
- Clarification gates: ask only when a missing fact changes the outcome
- Voice interruptions: stop stale speech before handling a new turn
- Spoken confirmations: repeat the risky field, not the whole form
- Voice tool waits: report progress without inventing an outcome
- Real-time voice evaluations: test timing and state, not transcript fluency
- Project: a voice call that renews the right library item
- Real-time voice prompt decisions
