delightful-painting-21962
11/25/2025, 12:36 PMtall-airline-16756
11/25/2025, 12:36 PMtall-airline-16756
11/25/2025, 12:37 PMmin_endpointing_delay and max_endpointing_delay in Node, plus a kid-friendly explanation and what changing them does — here's a concise answer.
Where to add them in Node.js
import { voice } from '@livekit/agents';
import * as livekit from '@livekit/agents-plugin-livekit';
const session = new voice.AgentSession({
turnDetection: new livekit.turnDetector.EnglishModel(), // optional
min_endpointing_delay: 0.5, // seconds
max_endpointing_delay: 6.0, // seconds
// ...other config
});
// Or update at runtime:
session.update_options({
min_endpointing_delay: 1.0,
max_endpointing_delay: 3.0,
});
Simple (five‑year‑old) explanation
• min_endpointing_delay: the tiny pause the robot waits after you stop talking to make sure you're done.
◦ Lower = robot jumps in faster (may interrupt).
◦ Higher = robot waits longer (less interruption, feels slower).
• max_endpointing_delay: the longest the robot will keep waiting if it thinks you might continue.
◦ Lower = robot gives up sooner and responds.
◦ Higher = robot waits a long time for slow talkers (can feel very slow).
Practical effect summary
• Decrease `min_endpointing_delay`: snappier responses, more risk of cutting people off.
• Increase `min_endpointing_delay`: more polite listening, slower response.
• max_endpointing_delay controls the ceiling for waiting when using a smart turn detector — lower makes the agent stop waiting sooner, higher lets it wait longer for late speech.
Would you like a recommended starting values set for your use case (e.g., short prompt/fast responses vs long pauses/slow speakers)?
Sources: LiveKit turn detector plugin | LiveKit docs | Turn detection and interruptions | LiveKit Docs | Agent Session Management & Turn Detection | livekit/livekit_composite | Dee...delightful-painting-21962
11/25/2025, 12:40 PMtall-airline-16756
11/25/2025, 12:41 PMmin_endpointing_delay / max_endpointing_delay (snake_case). Change your config to those names:
const session = new voice.AgentSession({
// ...
min_endpointing_delay: 0.5,
max_endpointing_delay: 6.0,
});
2) If your installed SDK types use different keys (camelCase), update to match the types
• Check AgentSessionOptions in your installed @livekit/agents types to see the exact property names. Use whatever names that type defines.
3) Temporary TypeScript workarounds (use if you can’t change SDK/type immediately)
• Cast to any when constructing the session:
const session = new voice.AgentSession({
// options...
min_endpointing_delay: 0.5,
max_endpointing_delay: 6.0,
} as any);
• Or extend the options type:
interface MyOptions extends AgentSessionOptions<any> {
min_endpointing_delay?: number;
max_endpointing_delay?: number;
}
const session = new voice.AgentSession<MyOptions>({ ... });
4) Version mismatch possibility
• If the runtime supports min_endpointing_delay but your local types don’t, you likely have a version mismatch between runtime package and installed types. Check your package.json for @livekit/agents and update to a version where those options exist (or align runtime and local versions).
What I need if you want precise code
• Paste the AgentSession call (few lines around it) and the version of @livekit/agents in your package.json. I’ll tell you the exact property name or a minimal code change to fix the build.