best-battery-56004
10/24/2025, 8:57 PMtall-airline-16756
10/24/2025, 8:58 PMtall-airline-16756
10/24/2025, 8:58 PMon_exit() method of the task?
• Are there any callbacks or event listeners (like add_done_callback() or on_pipeline_reply_done()) that might be generating the speech?
• Are you using methods such as say() or generate_reply() around the time the task finishes?
Getting a clearer picture of this will really help us find the best way to prevent the speech. Looking forward to your thoughts!
Sources: livekit-agents/livekit/agents/voice/agent_activity.py | agents/src/voice/agent_activity.ts | agent/main.pybest-battery-56004
10/24/2025, 9:02 PMon_exit() so I assume not.
• Upon task completion, I call self.complete(result) in a tool. I'm guessing this is causing the speech generation.
• No I do not use say() or generate_reply() at the time the task finishes.tall-airline-16756
10/24/2025, 9:03 PMself.complete(result) isn’t clearly documented as triggering speech generation. Could you please let me know if this is something custom you’ve implemented or if it’s part of a particular LiveKit tool? If it’s a custom setup, I’d love to understand more about how it’s implemented or the context around it. I’m here to help!
Sources: livekit-agents/livekit/agents/voice/agent_activity.py | agents/src/voice/agent_activity.ts | Docs::Agentsbest-battery-56004
10/24/2025, 9:14 PMtall-airline-16756
10/24/2025, 9:15 PMAgentTask is returning a string, it makes sense that this might trigger speech generation since the system could interpret it as something to be spoken aloud.
To help avoid this, you might consider adjusting the tool to return a non-string result, like None or a structured object, whenever you don’t want speech to happen. Another option is to explicitly suppress speech by handling the result in a way that prevents the agent’s logic from triggering speech generation.
If you'd like, I’m here to help you work through the details—just let me know more about how your tool behaves or the specific situation, and we can figure it out together!