Issue: Agent doesn't respond when starting session...
# agents
h
Issue: Agent doesn't respond when starting session with audio disabled I’m starting a
AgentSession
with audio disabled (text-only interaction first), but the agent doesn’t reply to the first text message. Here's the relevant setup: python >
session = AgentSession(
>
stt=deepgram.STT(),
>
llm=llm,
>
tts=google.TTS(
>
gender="female",
>
voice_name="en-US-Chirp-HD-F",
>
),
>
vad=silero.VAD.load(min_silence_duration=1.0),
>
allow_interruptions=False,
>
)
> >
session.input.set_audio_enabled(userdata.audio_enabled)
>
session.output.set_audio_enabled(userdata.audio_enabled)
When
userdata.audio_enabled = False
, I expect it to respond via text (no voice input/output), but the first text message gets no reply.
@ctx.room.local_participant.register_rpc_method("toggle_audio")
def on_toggle_audio(data: rtc.RpcInvocationData) -> None:
session.input.set_audio_enabled(not session.input.audio_enabled)
session.output.set_audio_enabled(not session.output.audio_enabled)
…then send a message, the agent replies properly. ✅ So toggling fixes it — but only after the first failed attempt. ❓Why doesn't the agent respond to text input when the session is first initialized with audio disabled? Any advice on initializing a voice-capable session that starts in "text-only" mode? #livekit #agents
j
should be fixed in https://github.com/livekit/agents/pull/3063, for now you can call the
session.input.set_audio_enabled(False)
after
session.start
or after the RoomIO manually set.