breezy-keyboard-19095
09/30/2025, 1:37 PMtall-airline-16756
09/30/2025, 1:37 PMtall-airline-16756
09/30/2025, 1:38 PMturn_detection setting in an AgentSession can’t be changed once the session is initialized, as it’s a read-only property that needs to be set up right when you create the session.
If you’re looking to switch between push-to-talk and hands-free modes, the best approach is to create separate AgentSession instances for each mode. Another option is to consider using independent components like SpeechStream or RealtimeModelBeta, which do allow you to update turn detection options on the fly, though they aren’t directly connected to AgentSession.
Please feel free to reach out if you’d like me to walk you through examples or help with anything else—I’m here to help!
Sources: livekit-plugins/livekit-plugins-turn-detector/README.md | examples/src/realtime_turn_detector.ts