Skip to content

Feature/interrupt handler kriti chaturvedi#485

Open
kritic2911 wants to merge 6 commits intoDark-Sys-Jenkins:mainfrom
kritic2911:feature/interrupt-handler-kritiChaturvedi
Open

Feature/interrupt handler kriti chaturvedi#485
kritic2911 wants to merge 6 commits intoDark-Sys-Jenkins:mainfrom
kritic2911:feature/interrupt-handler-kritiChaturvedi

Conversation

@kritic2911
Copy link

Real-Time Filler Word and Phrase Detection

Summary

Implemented an intelligent interrupt handler that detects and filters filler words/phrases in real-time during voice conversations, allowing the agent to continue speaking naturally when users provide acknowledgments.

Features Implemented

  • Real-time filler word detection (yeah, okay, hmm, etc.)
  • Phrase detection (all right, hang on, never mind, etc.)
  • Backward-looking phrase matching for immediate detection
  • Context-aware behavior based on agent speaking state
  • Proper handling of interrupt words/phrases (stop, wait, hold on, etc.)

Technical Approach

  • Uses AssemblyAI STT streaming for word-level transcription
  • Detects phrases as they're spoken using backward-looking matching
  • Calls session.drain() to remove filler messages from queue
  • Tuned VAD parameters to minimize false interruptions

Testing Evidence

See log\transcription_logs.log for detailed test logs demonstrating:

  1. Agent ignoring "yeah" while speaking
  2. Agent responding to "yeah" when silent
  3. Agent stopping for "stop"

Files Changed

  • basic_agent_modified.py - Main implementation
  • requirements.txt - Updated dependencies
  • log\transcription_logs.log - Test evidence and logs

Dependencies

  • livekit-agents
  • livekit-plugins-assemblyai
  • livekit-plugins-openai
  • livekit-plugins-cartesia
  • livekit-plugins-silero
  • python-dotenv

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