Voice attendants: listen, respond and stop reliably
Design turn-taking, interruptions and tool permissions as one observable interaction.
Preparation: Timing diagrams and state transitions.
Plan 20–35 minutes with the activities; this is a study estimate, not a timed requirement. Both paths have complete narration. Your notes and progress are kept separately for each level.
FULL LOCAL NARRATION
Follow the complete explanation.
Narration includes worked solutions. Pause at each practice prompt before continuing. Formula notation has a spoken explanation; all teaching text remains readable.
College path. Design turn-taking, interruptions and tool permissions as one observable interaction.
Preparation: Timing diagrams and state transitions. Work through one section at a time. Predict the experiment result before changing its controls, then explain what the example leaves out.
A voice attendant needs to distinguish listening, processing, speaking and interrupted states. Clear transitions prevent the system from talking over the user or acting on incomplete speech. Represent state transitions explicitly with event identifiers. Audio input, recognition, model output and playback can overlap; a single busy flag is often insufficient.
Worked step 1. Draw listening to processing to speaking.
Worked step 2. Add a user-interruption transition.
Worked step 3. Specify what happens to pending output.
Try it yourself. Is stopping the visible animation enough to stop speech?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Playback and generation state must be handled explicitly.
Section 02 / 07
Budget latency by stage
End-of-turn detection, recognition, response generation and audio buffering all contribute to perceived delay. Some stages may overlap, so a serial sum is only a stated fixture. Measure from a defined user event to actual audible output. Report distributions and queueing, not just an average stage time; streaming and overlap alter the critical path.
serial delay = endpoint + recognition + model + buffer
Worked step 1. Endpoint delay is 200 milliseconds.
Worked step 2. Recognition, model and buffer add 120,300,80.
Worked step 3. Serial first-audio delay is 700 milliseconds.
Try it yourself. Would removing 100 milliseconds from a fully overlapped stage always save 100 overall?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. End-to-end improvement depends on the critical path and buffering.
Section 03 / 07
Endpoint detection makes a trade-off
A short silence may be a thinking pause rather than the end of a turn. Aggressive endpointing responds quickly but can interrupt; cautious endpointing can feel slow. Evaluate voice activity and semantic endpoint policies on pauses, noise, accents and short acknowledgments. Tune false cutoffs and delayed responses against the intended users.
Worked step 1. Record a sentence with a mid-thought pause.
Worked step 2. Test whether the attendant starts too early.
Worked step 3. Compare with a genuinely finished sentence.
Try it yourself. Is the shortest silence threshold always best?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. It can trade lower latency for more interruptions and incomplete requests.
Section 04 / 07
Cancel stale work on interruption
When the user interrupts, old audio and pending responses should not resume unexpectedly after the new turn. Cancellation needs to reach the relevant generation and playback components. Use turn IDs or cancellation tokens to discard stale chunks and tool proposals. Already executed external actions need explicit status handling; cancellation cannot magically undo every side effect.
Worked step 1. Start response for turn A.
Worked step 2. Interrupt and begin turn B.
Worked step 3. Reject late audio chunks tagged A.
Try it yourself. Does cancelling a request necessarily undo a sent message?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. An external side effect may already have occurred. Report its actual status and handle it separately.
Section 05 / 07
Keep tool permissions outside the voice guess
Recognition can mishear a name or instruction. Before consequential actions, expose the intended action and apply the required authorization rather than treating a model’s confidence as permission. Separate transcript, interpreted intent, proposed arguments and execution result. Apply least-necessary tool scope and timeouts; untrusted audio or retrieved content does not grant new authority.
Worked step 1. Recognize a requested action.
Worked step 2. Show or read back critical details when needed.
Worked step 3. Execute only within the established permission.
Try it yourself. Can a confident transcript authorize an unrelated tool action?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Confidence and authorization are different dimensions.
Section 06 / 07
Test failure and privacy behavior
A dependable attendant handles silence, disconnection, failed tools and unavailable models without inventing success. Record only the data needed for the intended operation and explain retention behavior. Test timeouts, duplicate events, reconnects and deletion or retention controls. Local models alone do not guarantee that every component stays local; inspect the actual data path.
Worked step 1. Disconnect during a response.
Worked step 2. Verify stale speech does not replay.
Worked step 3. Check the displayed action status and retained data.
Try it yourself. Does a locally stored model prove the whole conversation stays local?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Transport, telemetry, tools and other services can still send data elsewhere; verify the complete path.
Section 07 / 07
Mastery and transfer
Bring the pieces together. First answer the checkpoint without the worked solutions. Then explain the mechanism in your own words, using one numerical example from this lesson.
On a new turn after interruption, late chunks from the old turn should… Option 1: Play whenever they arrive. Option 2: Be identified and discarded when stale. Option 3: Automatically authorize a tool call.
Pause here and choose an answer before continuing. The checkpoint explanation follows.
Reveal worked solution
The correct choice is option 2: Be identified and discarded when stale. Turn identity and cancellation prevent old work from leaking into the new interaction.
Transfer task. Change one assumption in the worked example. State your prediction, calculate or test it in Workbench, then explain whether the result supports your prediction.
Reveal worked solution
Self-check rubric. Name the changed assumption, keep the other inputs fixed, show at least one intermediate calculation, and distinguish what the toy example guarantees from what would require a trained model or a real measurement.
WORKBENCH / PREDICT → TEST → EXPLAIN
Inspect exact numerical data
These are computed teaching fixtures. No remote AI model or GPU is called by the experiment.
CHECK YOUR UNDERSTANDING
Commit to an explanation.
Keep your learning record.
Sources and scope
Original worked examples and teaching text, grounded in these primary references. Numerical fixtures explain mechanisms; model quality and hardware performance require separate measurements. Both levels share key examples, with different explanations and checkpoints.