big-controller-60015
05/12/2025, 1:07 PM@ctx.room.local_participant.register_rpc_method("start_turn")
tall-airline-16756
05/12/2025, 1:07 PMtall-airline-16756
05/12/2025, 1:07 PM@ctx.room.local_participant.register_rpc_method("start_turn")
in LiveKit Agents 1.x is used to register a Remote Procedure Call (RPC) method that can be triggered by clients. This is particularly useful for implementing manual turn detection in voice AI agents, such as in push-to-talk scenarios.
When this method is registered, it allows the agent to:
• Interrupt any current agent speech using session.interrupt()
• Clear any previous user input with session.clear_user_turn()
• Set the agent to listen to the specific participant who called the method
• Enable audio input using session.input.set_audio_enabled(True)
This approach is part of a manual turn control system where the agent listens only when explicitly triggered by the client, rather than relying on automatic turn detection methods like VAD or STT endpointing.
Sources: Tree View: | dse-workbench | Turn detection and interruptions | LiveKit Docs | Turn detection and interruptions | LiveKit Docs