Skip to content

fix(voice): clear false-interruption timer on interim/preflight - #7199

Open
devtechedge wants to merge 1 commit into
livekit:mainfrom
devtechedge:fix/interim-clears-false-interruption-timer
Open

fix(voice): clear false-interruption timer on interim/preflight#7199
devtechedge wants to merge 1 commit into
livekit:mainfrom
devtechedge:fix/interim-clears-false-interruption-timer

Conversation

@devtechedge

Copy link
Copy Markdown

Summary

Fixes #7198.

With VAD present, a mid-utterance pause arms the false-interruption timer on end_of_speech. PREFLIGHT_TRANSCRIPT / INTERIM_TRANSCRIPT (both routed through on_interim_transcript) did not clear that timer when VAD was configured, so the agent could resume before the turn committed and the user's partial transcript was lost (reproduced with Deepgram Flux).

This change cancels the false-interruption timer when a non-empty interim/preflight arrives while speech is paused, and re-arms only when speaking is False (same re-arm rule the VAD-less path already used).

Changes

  • livekit-agents/livekit/agents/voice/agent_activity.py: clear (and conditionally re-arm) the timer in on_interim_transcript for both VAD and VAD-less paths
  • tests/test_false_interruption_resume.py: regression coverage for interim while speaking, interim re-arm after EOS, and preflight clear

Test plan

  • uv run pytest tests/test_false_interruption_resume.py -x -q (12 passed)
  • ruff check / ruff format on touched files

Notes

AI-assisted implementation. Happy to adjust if maintainers prefer clear-only (no re-arm) for the VAD path.

PREFLIGHT_TRANSCRIPT and INTERIM_TRANSCRIPT are routed through
on_interim_transcript. With VAD present, a mid-utterance pause armed
the false-interruption timer on end_of_speech, but later STT interim
or preflight events did not clear it, so the agent resumed and the
user's partial transcript was lost (notably with Deepgram Flux).

Cancel the timer when non-empty interim/preflight arrives while speech
is paused, and re-arm only when speaking has already ended. Fixes livekit#7198.
@devtechedge
devtechedge requested a review from a team as a code owner September 9, 2026 22:16
@CLAassistant

CLAassistant commented Sep 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PREFLIGHT_TRANSCRIPT/INTERIM_TRANSCRIPT should clear false interruption timer

2 participants