Real-time avatar APIs manage response delay across several stages: capturing input, deciding a turn has ended, preparing an answer, generating speech, delivering media and playing it. Interruption adds a second job: stop the obsolete response and prevent it from returning after the user changes direction.
AKOOL provides a documented interrupt control. That is a useful building block, but your application still needs a clear conversation policy and a measured recovery test. This guide follows one interrupted turn, rather than comparing platform speed or explaining concurrent-session capacity.
Evidence checked November 24, 2026. This is an implementation and pilot plan, not a performance benchmark. No measured latency, automatic barge-in result or guaranteed stop time is claimed.
Where does the user experience response delay?
Begin with a session that is already connected and able to play audio. Keep session creation and channel joining in a separate startup measurement. Otherwise, a cold connection can dominate the number you present as conversational response time.
For a voice conversation, record the last audible part of the user's utterance and the first audible part of the avatar's relevant answer. The interval includes any wait for speech-end detection. For text input, begin at submission instead. Keep these trials separate: a text request bypasses the microphone and speech-recognition path.
| Milestone | Recommended observation | Interpretation |
|---|---|---|
| Input ends | Last user speech in an authorized recording, or text submission timestamp | Starting boundary for the selected trial |
| Input is accepted | Application submission and available recognition events | Distinguishes local capture from downstream work |
| Answer becomes available | First response event visible to the application | Useful diagnostic; it is not necessarily audible output |
| Playback starts | First relevant audible response at the client | User-perceived response boundary |
| Visible delivery stabilizes | Recording of useful avatar video accompanying speech | Check separately from audio startup |
These are proposed measurement boundaries, not names of AKOOL SDK events. Instrument the events actually exposed by your selected integration. When the provider does not expose a stage, mark it unobservable rather than assigning the whole unexplained interval to model reasoning.
AKOOL's Streaming Avatar API overview is the reference for the current session and stream-message interface. Use it to establish the integration path before adding timing instrumentation.
What does an interruption actually stop?
Separate four behaviors: recognizing that the user wants to interrupt, sending an interruption command, stopping audible output, and cancelling any upstream work. A button can trigger the second behavior without providing automatic speech detection. Playback can stop while a separately managed model request continues running.
The public AKOOL interface documents an interrupt command for stopping the current avatar response. The akool-streaming-avatar-sdk reference also lists interrupt(). Read the reference for the exact package version and mode you deploy; do not assume all integrations share identical semantics.
A resolved method call is not a measurement of silence at the listener's device. In the pilot, capture both the moment the application requests interruption and the moment the old answer is no longer audible. Also check whether queued media returns. If your application separately owns an LLM request or speech queue, implement and verify its cancellation independently.
Automatic voice barge-in needs an additional verified path from detected speech to interruption. Check behavior with background noise, short acknowledgements and deliberate corrections. A microphone toggle or a callable interrupt method alone does not establish that behavior.
How should the next turn replace the old one?
Use an application-managed turn identifier and a current-turn pointer. When the user changes direction, mark the previous turn superseded before accepting a replacement response. Correlate application work with provider message identifiers where the documented interface allows it. Do not invent an API parameter called turn ID.
The recommended state sequence is listening, processing, speaking, interrupting and listening again. Add a recovery state when the interruption fails or the connection is uncertain. These labels describe application behavior; they are not claimed native AKOOL states.
- Record the user's correction and advance the application's current turn.
- Mark unfinished work for the previous turn obsolete.
- Invoke the documented interruption control for the selected integration.
- Cancel separately owned upstream work where supported and discard obsolete local queue entries.
- Accept new playback only when it belongs to the active turn.
- Confirm recovery before presenting the interface as ready.
For example, a user asks about hotel check-in, then says, “Actually, I need to change my booking.” The next answer should address the correction. A late check-in answer must not play after the booking response has started.
Keep the transcript honest. Preserve the user's original question and correction if needed for context, but distinguish generated text from speech actually delivered. Otherwise, a later response may assume that the user heard instructions that were interrupted halfway through.
How can you measure delay without misleading readers?
Write down the selected SDK package and version, transport, interaction mode, avatar, voice, input language, client device, browser, network conditions and test region. Record only settings you can establish. Do not infer a provider's serving region from the user's location.
Use a consistent set of short questions and corrections. Run text and microphone trials separately. Repeat the same cases, retain failures and note whether the session was warm or newly connected. Decide the sample size and reporting method before inspecting results.
For timestamps collected in one browser, use a monotonic clock. If a server timestamp enters the calculation, establish clock alignment or report that segment separately. Never subtract unrelated client and server clocks and label the difference network latency.
After real measurements, report the sample count, median and tail behavior such as p95 with the percentile method and conditions. A small sample gives a weak estimate of tail delay. Report timeouts and excluded trials explicitly; a summary of successful runs alone hides recovery failures.
Do not adopt a universal “acceptable” delay from a marketing claim. Set your pilot's acceptance limits around the actual conversation: a kiosk greeting, a support answer and a complex explanation can have different tolerances.
Which interruption cases should the pilot include?
The matrix below is a proposed test plan. Fill the observed-result column only after running each case in your named configuration.
| Case | Action | Acceptance evidence to capture |
|---|---|---|
| Before first speech | Replace a request while the avatar is preparing an answer | No obsolete answer begins after replacement |
| Near speech start | Interrupt as the first sentence begins | Request-to-silence interval; correct next answer |
| Mid-sentence | Correct one detail during a longer reply | Playback stops and context reflects the correction |
| Rapid second input | Send two corrections close together | Only the active turn is delivered |
| Delayed old response | In a controlled harness, delay an application-owned old result | The obsolete result is discarded, not replayed |
| Recovery failure | Exercise a documented failure or controlled connection loss | Visible recovery state and usable fallback |
Keep a timestamped observation log with trial ID, configuration, old and new application turn IDs, input boundary, interrupt request, last old audio, first new audio, visible behavior and outcome. Add a link to an authorized recording where available. A failed run belongs in the log even if a retry succeeds.
For voice-triggered interruption, add false-trigger and missed-trigger cases. A cough should not silently erase the conversation unless your interaction design intends it. A clear correction should not be ignored merely because the avatar is speaking. Record the observed result without presenting a planned control as an existing product feature.
What should the interface do when recovery fails?
Show whether the application is listening, preparing a response, speaking or recovering. Offer a clear stop control and a text route when voice recovery is unreliable. If the old response cannot be stopped confidently, follow a verified reconnect or session-close path rather than continuing with overlapping answers.
Keep capacity planning separate; see AKOOL's concurrent customer sessions guide when scaling the pilot. For this task, start with one session, one correction and one recorded recovery trace. Review the AKOOL Streaming Avatar documentation and define the behavior your application must verify before launch.
