Skip to content

Implement deferred interruption handling for backchannels#475

Open
Github-Shashwat wants to merge 2 commits intoDark-Sys-Jenkins:mainfrom
Github-Shashwat:feature/interrupt-handler-shashwat
Open

Implement deferred interruption handling for backchannels#475
Github-Shashwat wants to merge 2 commits intoDark-Sys-Jenkins:mainfrom
Github-Shashwat:feature/interrupt-handler-shashwat

Conversation

@Github-Shashwat
Copy link

@Github-Shashwat Github-Shashwat commented Feb 2, 2026

Deferred Interruption Handling for Backchannels

This PR fixes an interruption issue in the LiveKit voice agent pipeline where short passive acknowledgements such as "okay", "yeah", or "uh-huh" were incorrectly treated as real interruptions and caused the agent to cut off mid-speech.

Key Improvements

  • Adds a deferred interruption grace window inside AudioRecognition
  • Prevents false cutoffs triggered purely by VAD activity
  • Uses STT-confirmed intent before committing an interruption
  • Preserves immediate interruption for intent commands such as "stop" or "wait"

Proof (Video)

  • Agent ignores "Okay" while speaking
  • Agent responds to "Yeah" when silent
  • Agent interrupts immediately on "Stop"

Files Changed

  • livekit-agents/livekit/agents/voice/audio_recognition.py
  • livekit-agents/livekit/agents/voice/agent_activity.py
  • livekit-agents/livekit/agents/ipc/supervised_proc.py

Notes

This resolves the VAD–STT race condition without relying on pause/resume behavior and aligns with the assignment requirement for robust yet responsive interruption handling.

Video demonstration attached below.
https://drive.google.com/file/d/1PrefOubQecFKNXs6Qi45-oJTlHnhPsAI/view

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.

1 participant