Repository navigation
feat: let a pool skip the multilingual turn detector - #152
Merged
Merged
Conversation
AgentPool(turn_detector=False) stops both servers from importing the multilingual turn detector, so livekit starts no inference process for it (about 250 MB), and prewarm stores no factory. Sessions fall back to VAD turn detection unless their turn_handling says otherwise.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
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.
Before: every OpenRTC worker imports the multilingual turn detector when it starts. That import registers livekit's inference runner, so livekit starts an inference process of about 250 MB even when no agent uses the detector. On a 500 MB host that does not fit.
After:
AgentPool(turn_detector=False)skips the import in both the coroutine and process servers. Prewarm loads only Silero and stores no turn detector factory, and sessions fall back to VAD turn detection unless their ownturn_handlingsets something else. The default staysTrue, so nothing changes for existing pools.How: the flag goes from
AgentPoolintoServerParams(servers) and_PoolRuntimeState(prewarm)._default_turn_detectionreturns"vad"when no factory was prewarmed. New tests intests/test_turn_detector_optout.pycover both servers, prewarm, the VAD fallback and the flag plumbing. Docs and the changelog have one line each.make cipasses locally (99.46% coverage).