bulky-car-15738
10/03/2025, 10:50 AMtall-airline-16756
10/03/2025, 10:50 AMtall-airline-16756
10/03/2025, 10:51 AMbulky-car-15738
10/03/2025, 10:52 AMtall-airline-16756
10/03/2025, 10:52 AMset_audio_enabled() method from the AgentSession.input object. This gives you the flexibility to turn audio input on or off during your session whenever you need.
Here's a simple example:
session.input.set_audio_enabled(False) # Disable audio input
# Perform your tool execution here
session.input.set_audio_enabled(True) # Enable audio input
If you'd prefer to start your session with audio input disabled, you can do so by setting audio_enabled=False in the RoomInputOptions when you initialize the session:
await session.start(
agent=Agent(instructions="..."),
input_options=RoomInputOptions(audio_enabled=False)
)
Please feel free to reach out if you'd like me to walk you through more examples or if you have any other questions. I'm here to help!
Sources: Text and transcriptions | LiveKit Docs | livekit-agents/livekit/agents/voice/chat_cli.py