freezing-jelly-85538
09/20/2025, 12:44 AMtall-airline-16756
09/20/2025, 12:44 AMtall-airline-16756
09/20/2025, 12:45 AMdraining flag in the AgentActivity class helps by skipping new speech generation when draining is active.
• The interrupt() method in AgentActivity can interrupt both current and queued speech tasks, and it returns an asyncio.Future once the interruption is processed.
• Additionally, the allowInterruptions property of SpeechHandle offers control over managing interruptions.
These features work together to make handling speech and tasks during draining smoother. If you'd like, I’m here to help with more details or walk you through the implementation—just let me know!
Sources: agents/src/voice/agent_session.ts | livekit-agents/livekit/agents/voice/agent_activity.py | Agent speech and audio | LiveKit Docs