Automatic user turn commit even when using `turn_detection="manual"`
Hi, I have a push-to-talk application that uses a manual turn detection system. With a recent update of the livekit-agents library, however, I've noticed that the user turn automatically ends (either via VAD or gpt-4o-mini-transcribe's automatic detection, I assume) before the user and system manually ends the turn.
Root Cause
When I set livekit-agents[deepgram,openai,cartesia,elevenlabs,groq,google,aws,silero,turn-detector]==1.2.11 in the requirements file, the manual turn detection works as expected, but when I change it to livekit-agents[deepgram,openai,cartesia,elevenlabs,groq,google,aws,silero,turn-detector]~=1.2 and it updates to livekit-agents==1.2.14, manual turn detection breaks.
Background
The system receives a "start_listening" and "stop_listening" rpc call from the frontend. When "start_listening" is received, session.input.set_audio_enabled(True) is called, and when "stop_listening" is received, session.input.set_audio_enabled(False) and session.commit_user_turn() is called. This is the only place user turn is committed, and the turn_detection is set as manual (see below for the configuration)
session = AgentSession(
stt=stt_engine,
llm=llm_engine,
vad=silero.VAD.load(),
turn_detection="manual",
tts=tts_engine,
allow_interruptions=allow_interruptions,
user_away_timeout=None,
)
I'm using gpt-4o-mini-transcribe for the stt engine, gpt-5-mini for the llm, and a different tts for different situations.
Package Versions
Working requirements.txt
livekit-agents[deepgram,openai,cartesia,elevenlabs,groq,google,aws,silero,turn-detector]==1.2.11
livekit-plugins-noise-cancellation~=0.2
python-dotenv
redis
json_repair
demjson3
better-profanity
Broken requirements.txt
livekit-agents[deepgram,openai,cartesia,elevenlabs,groq,google,aws,silero,turn-detector]==1.2.14
livekit-plugins-noise-cancellation~=0.2
python-dotenv
redis
json_repair
demjson3
better-profanity
seems related to https://github.com/livekit/agents/pull/3245, will fix it soon.