white-room-9349
05/19/2026, 4:11 PMtall-airline-16756
05/19/2026, 4:11 PMtall-airline-16756
05/19/2026, 4:11 PMwhite-room-9349
05/19/2026, 4:11 PMtall-airline-16756
05/19/2026, 4:11 PMparams.participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP (a SIP/telephone caller), it returns noise_cancellation.BVCTelephony(), which is optimized for telephony/narrowband audio.
• Otherwise (web/browser/mobile WebRTC participants), it returns noise_cancellation.BVC(), which is for typical WebRTC audio.
This lets the system apply the best noise‑cancellation model automatically for SIP vs non‑SIP participants.
Sources: How to Build a Background Observer for Voice AI Guardrails | LiveKit | LiveKit Platform | Build, run, and observe voice AI agents | LiveKit | Using Noise Cancellation for SIP and WebRTC Participants, with interactive elementswhite-room-9349
05/19/2026, 4:23 PMtall-airline-16756
05/19/2026, 4:24 PMendpointing_kwargs block works — specifically how the min/max endpointing delays are set and what they control.
• The code builds a dictionary with two keys: min_endpointing_delay and max_endpointing_delay.
• Each value is set to the provided `min_delay`/`max_delay` converted to float if that value is not `None`; otherwise it falls back to DEFAULT_MIN_ENDPOINTING_DELAY / DEFAULT_MAX_ENDPOINTING_DELAY.
• These delays control end‑of‑turn behavior:
◦ min_endpointing_delay is the shortest wait after detecting a likely end‑of‑utterance before the agent responds (used when detection confidence is high).
◦ max_endpointing_delay is the longest wait when confidence is low.
• This mechanism prevents cutting users off by adding a configurable wait after VAD/turn detection; the system uses VAD, STT signals, or realtime LLM turn detectors and applies these min/max delays to decide when to endpoint and respond.
If you want, tell me the default values you see (or your desired timings) and I can suggest reasonable min/max settings.
Sources: Using a transformer to improve end of turn detection | LiveKit | How does end-of-utterance detection work in conversations?, with interactive elementswhite-room-9349
05/19/2026, 4:24 PMtall-airline-16756
05/19/2026, 4:24 PMendpointing_kwargs (and similar settings like the noise-cancellation lambda) are applied in a session config. Briefly: session config holds per-session/agent settings; these fields are placed on the session (or agent) config that the LiveKit agent/observer reads at start or when updated.
What to put where
• Place endpointing_kwargs inside the session (or agent) configuration object that your agent process receives when a room/session is created or updated.
• Put the noise-cancellation lambda in the audio/processing section of the session config where the agent selects audio processing behavior per participant.
What the system does with them
• On session start (or when config is reloaded), the agent reads endpointing_kwargs and uses min_endpointing_delay and max_endpointing_delay to control end‑of‑turn timing for that session.
• The noise-cancellation lambda is evaluated per participant at runtime; it chooses BVCTelephony() for SIP participants and BVC() for non‑SIP participants.
Defaults and type expectations
• min_endpointing_delay and max_endpointing_delay must be numeric (seconds). If omitted, defaults are used (e.g., DEFAULT_MIN_ENDPOINTING_DELAY, DEFAULT_MAX_ENDPOINTING_DELAY).
• The noise-cancellation entry must be a callable (or serializable equivalent your agent expects) that can inspect params.participant.kind.
Example placement (conceptual)
• In a session JSON/YAML, include an audio/processing block and an endpointing block, for example:
{
"audio": {
"noise_cancellation": "<lambda-or-config>"
},
"endpointing": {
"min_endpointing_delay": 0.5,
"max_endpointing_delay": 6
}
}
(How you represent the lambda depends on your agent: some implementations accept a function object in code; others accept a config flag that maps to the correct function.)
If you want, tell me:
• How your session config is delivered (JSON file, API, or in‑process object), and
• Whether you need the exact config snippet for a code-based agent or for a serializable config (JSON/YAML).
I’ll give the precise example that fits your setup.
, with interactive elementswhite-room-9349
05/19/2026, 4:28 PMtall-airline-16756
05/19/2026, 4:28 PMvad = silero.VAD.load() and ctx.proc.userdata["vad"].
• vad = silero.VAD.load()
◦ Loads a new Silero VAD instance at that moment.
◦ Causes model initialization (disk I/O / weight loading) per load, which can add latency when a session starts.
• ctx.proc.userdata["vad"]
◦ References a VAD instance that was preloaded into the process during a prewarm/setup step and stored in proc.userdata.
◦ Reuses the already-loaded model across jobs in the same process, avoiding repeated initialization and reducing per-session startup latency.
When to use which:
• Use silero.VAD.load() only if you must create an isolated VAD per session.
• Prefer ctx.proc.userdata["vad"] (prewarm + reuse) for better performance in production agents.
If you want, tell me whether you’re running a single-process or multi-process server and I’ll suggest the exact prewarm snippet to use.
Sources: Silero VAD plugin | LiveKit Documentation | Server options | LiveKit Documentation, with interactive elementswhite-room-9349
05/26/2026, 4:54 PMwhite-room-9349
05/26/2026, 4:54 PMtall-airline-16756
05/26/2026, 4:54 PMwhite-room-9349
05/26/2026, 4:55 PMtall-airline-16756
05/26/2026, 4:55 PMwhite-room-9349
05/26/2026, 4:56 PMtall-airline-16756
05/26/2026, 4:56 PMload_threshold so a busy worker can reject new jobs and let others handle them.
• On LiveKit Cloud this scaling is automatic; for self‑hosted you should autoscale worker processes based on the same metrics (CPU/load) to ensure capacity.
If you need message ordering or per-user sequencing:
• Implement a front‑door queue in your app that serializes messages per user/session before creating agent jobs, or
• Route all messages for a given conversation to the same agent session (keep the session open) and buffer incoming messages client‑side until the agent is ready, or
• Use a lightweight dispatcher that stores messages and only forwards them to a new agent job when capacity is available.
If you want, tell me:
• Whether you’re on LiveKit Cloud or self‑hosted, and
• Do you need per‑user ordering (serialize per user) or just higher concurrency?
I’ll provide a concrete pattern and a config/code snippet for your environment.
Sources: Voice Agent Architecture: STT, LLM, and TTS Pipelines Explained | LiveKit | Server lifecycle | LiveKit Documentation | Deploy and scale agents on LiveKit Cloud | LiveKit | Self-hosted deployments | LiveKit Documentation | Server options | LiveKit Documentation, with interactive elements