lively-horse-90722
08/20/2025, 11:44 AMtall-airline-16756
08/20/2025, 11:44 AMtall-airline-16756
08/20/2025, 11:45 AMRunContext.disallow_interruptions()
to make sure nothing interrupts those important operations.
• Wait for Speech Completion: Try RunContext.wait_for_playout()
so the agent finishes talking before the tool kicks in.
• Automatic State Management: The system’s pretty smart—it switches the agent’s state to “thinking” automatically during tool execution to keep things smooth.
• Control Speech Scheduling: You can tweak the tool_choice
parameter to turn off speech when the tool responds.
Using background audio is especially great for keeping users engaged without overlapping speech. If you want, I’m happy to share more details or examples to help you get this set up!
Sources: examples/voice_agents/silent_function_call.py | External data and RAG | LiveKit Docslively-horse-90722
08/20/2025, 11:47 AMtall-airline-16756
08/20/2025, 11:49 AMRoomOutputOptions(audio_enabled=False)
to stop the agent from producing any audio, but it’ll still listen and accept speech input.
• Filter Content Before TTS: Try using a before_tts_cb
callback to catch and tweak the agent’s text before it gets sent to the TTS engine.
• Content Filtering in LLM Pipeline: You could override the llm_node
method in your agent to dynamically filter out specific content.
• Fixed Participant Processing: By setting a fixed participant identity, the agent will only process audio from certain participants—this way, it won’t pick up its own audio.
• External STT Provider: If you’re using Speechmatics STT, you can configure it to ignore certain speakers (like the agent) with ignore_speakers
or focus_speakers
.
If you want, I’m happy to share more details or examples for any of these—just let me know!
Sources: How to Set Up Speech-to-Text Input with Text-Only Output in LiveKit Agents | chain-of-thought-tts/README.mdoc | pipeline-llm/llm_powered_content_filter.py | How to set a fixed participant for agent audio processing | livekit-agents/livekit/agents/voice/agent_activity.py