Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"typescript-eslint": "^8.46.2"
},
"dependencies": {
"@livekit/agents": "^1.0.11",
"@livekit/agents-plugin-livekit": "^1.0.11",
"@livekit/agents-plugin-silero": "^1.0.11",
"@livekit/agents": "~1.0.18",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you should keep ^ - i don't remember the specifics, but i remember doing a lot of testing and determining this is the best option

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to bump to 1.0.19 after this bug fix been merged.

"@livekit/agents-plugin-livekit": "~1.0.18",
"@livekit/agents-plugin-silero": "~1.0.18",
"@livekit/noise-cancellation-node": "^0.1.9",
"dotenv": "^17.2.3",
"zod": "^3.25.76"
Expand Down
8 changes: 6 additions & 2 deletions src/agent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
type JobContext,
type JobProcess,
WorkerOptions,
ServerOptions,
cli,
defineAgent,
inference,
Expand Down Expand Up @@ -79,6 +79,10 @@ export default defineAgent({
// See more at https://docs.livekit.io/agents/build/turns
turnDetection: new livekit.turnDetector.MultilingualModel(),
vad: ctx.proc.userData.vad! as silero.VAD,
voiceOptions: {
// Allow the LLM to generate a response while waiting for the end of turn
preemptiveGeneration: true,
},
});

// To use a realtime model instead of a voice pipeline, use the following session setup instead.
Expand Down Expand Up @@ -123,4 +127,4 @@ export default defineAgent({
},
});

cli.runApp(new WorkerOptions({ agent: fileURLToPath(import.meta.url) }));
cli.runApp(new ServerOptions({ agent: fileURLToPath(import.meta.url) }));
Loading