1. Can we use the EOU model in manual turn detecti...
# ask-ai
c
1. Can we use the EOU model in manual turn detection mode? Looking at the code, it seems like _run_eou_detection could be called manually. Can we set turn_detection="manual" and then programmatically trigger EOU detection when we want (like after our custom transcript delay)? 2. In STT mode, are we forced to use the STT provider's endpointing? If we use turn_detection="stt", does the system wait for the STT provider's END_OF_SPEECH event, or can we control when the turn ends while still using EOU? 3. Can we override interruption logic while keeping EOU? We want to: - Interrupt the agent only when we receive transcripts (not VAD) - Add a custom delay after transcripts before running EOU - Have EOU reset when new transcripts arrive Is this possible without forking? Could we use manual mode with session.commit_user_turn() but still access the EOU model's predictions? 4. What's the difference between these approaches: - Setting turn_detection="manual" and calling EOU detection ourselves - Setting turn_detection="stt" with custom STT event handling - Using a custom _TurnDetector instance 5. Can we access _run_eou_detection directly? Or is there a public API to trigger EOU evaluation on demand while in manual mode? The key question is: Can we have full control over WHEN the EOU runs (after our delays) and WHAT triggers its reset (transcripts only) while still benefiting from the EOU model's intelligence?
t
Thanks for reaching out, Clovis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Here are the answers to your questions: 1. Using the EOU model in manual turn detection mode: Yes, you absolutely can use the EOU model in manual mode! Just set
turn_detection="manual"
to turn off automatic turn detection, and then you can trigger EOU detection yourself by calling
session.commit_user_turn()
. This will run the EOU model's predictions, as long as it’s set up properly. 2. STT mode and control over turn ending: In STT mode (
turn_detection="stt"
), the system depends on the STT provider’s
END_OF_SPEECH
event to figure out when a turn ends. Unfortunately, you can’t programmatically control turn endings here. If you want full control, manual mode is the way to go. 3. Overriding interruption logic while keeping EOU: - You can set things up so the system only interrupts the agent when transcripts come in by adjusting
min_interruption_words
. - You can also add custom delays after transcripts before running EOU using
min_endpointing_delay
and
max_endpointing_delay
. - The EOU resets automatically whenever new transcripts arrive because the system cancels and restarts EOU detection with each new input. 4. Differences between approaches: 5. Accessing
_run_eou_detection
directly:
_run_eou_detection
is an internal method, so it’s not accessible directly. There isn’t a public API to trigger EOU evaluation on demand in manual mode. But, if you want, you can build your own custom logic with a custom turn detector to make use of EOU predictions. If you have any more questions or want me to walk you through anything, just let me know—I’m here to help! Sources: Turn detection and interruptions | LiveKit Docs | livekit-agents/livekit/agents/voice/agent_activity.py | Speech & Audio Processing | livekit/livekit_composite | DeepWiki | livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/s... | Turn detection and interruptions | LiveKit Docs
c
wait so you just told me contradictory things, "Yes, you absolutely can use the EOU model in manual mode! Just set
turn_detection="manual"
to turn off automatic turn detection, and then you can trigger EOU detection yourself by calling
session.commit_user_turn()"
but also "There isn't a public API to trigger EOU evaluation on demand in manual mode. But, if you want, you can build your own custom logic with a custom turn detector to make use of EOU predictions." So which one should I believe? can I trigger the EOU myself in manual mode or not?
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!