cuddly-vr-85751
12/27/2025, 6:48 PMtall-airline-16756
12/27/2025, 6:48 PMtall-airline-16756
12/27/2025, 6:48 PMcuddly-vr-85751
12/27/2025, 6:48 PMtall-airline-16756
12/27/2025, 6:48 PMctx.proc.userdata (use WorkerOptions(prewarm_fnc=...)) instead of calling silero.VAD.load() for every Agent/session.
• Pass the preloaded instance into your Agent so sessions reuse it.
2) Use optimal load parameters
• Call silero.VAD.load(force_cpu=True, sample_rate=16000) (match your audio sample rate) to avoid unnecessary resampling or device switching.
3) Reduce per-session initialization overhead
• Ensure get_stt_from_config, get_llm_from_config, and get_tts_from_config return already-initialized instances (or prewarm them similarly) so session start doesn’t block.
4) Check CPU and environment constraints
• Run the worker on a machine with sufficient CPU. Monitor CPU usage during inference — high CPU contention causes slowdown. Avoid tiny containers or shared noisy neighbors.
5) If inference still lags, measure to find the bottleneck
• Log processing time per audio chunk in VAD and other pipeline stages. That will show whether VAD, STT, or network calls are the culprit.
If you want, paste:
• how you currently start the worker (WorkerOptions/prewarm usage),
• your host CPU specs (vCPU count / container limits),
• the sample rate of incoming audio,
and I’ll give exact code edits and a short benchmark plan.
Sources: Repeater | LiveKit docs | Uninterruptable Agent | LiveKit docs | Silero VAD plugin | LiveKit docs | examples/voice_agents | livekit/livekit_composite | DeepWiki