Add example: Smart Turn detection - #92
Open
santhosh-005 wants to merge 1 commit into
Open
Conversation
|
@santhosh-005 is attempting to deploy a commit to the LiveKit Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/examples/smart_turn_detection/— using an open end-of-turn model asthe turn detector in an
AgentSession.turn_handling["turn_detection"]accepts any object implementing the streamingturn-detector protocol, but there is no example of supplying one. This shows the
shape:
on_predictionprints each decision, so the model is visible without afrontend:
STT, LLM and TTS are the same
inference.*models asdocs/examples/metrics_vad/, and VAD is the same Silero plugin. The one newdependency is
smart-turn-livekit, which loads the ONNX graph and adapts it tothe protocol — a few MB at int8, CPU-only, fetched from Hugging Face on first
use.
Default weights are upstream Smart Turn v3.
model=selects a different graph andmodel_path=loads your own.Plugin: https://github.com/santhosh-005/smart-turn-livekit (BSD-2-Clause)
Verified on
livekit-agents 1.7.0: frontmatter parses withdocs/tools/generate_index.py, the session builds with the detector attached,and real speech through the detector returns predictions in 55–123 ms on one CPU
thread. Not tested with a live call.