Skip to content

Commit b133d80

Browse files
committed
Update livekit configuration for production and remove prewarm VAD loading in index.ts
1 parent 9267b94 commit b133d80

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

livekit-agent/livekit.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
subdomain = "local-dev-6l2qilwn"
2+
subdomain = "prod-87bkq8ew"
33

44
[agent]
5-
id = "CA_dLp4eDQyTkkD"
5+
id = "CA_nD9UcjrtHQbR"

livekit-agent/src/index.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
type JobContext,
3-
type JobProcess,
43
ServerOptions,
54
cli,
65
defineAgent,
@@ -14,15 +13,8 @@ import { fileURLToPath } from "node:url";
1413
import { createVoiceAgent } from "./agent.js";
1514

1615
export default defineAgent({
17-
prewarm: async (proc: JobProcess) => {
18-
try {
19-
proc.userData.vad = await silero.VAD.load();
20-
} catch (err) {
21-
console.error("[prewarm] Failed to load VAD model:", err);
22-
throw err;
23-
}
24-
},
2516
entry: async (ctx: JobContext) => {
17+
const vad = await silero.VAD.load();
2618
const session = new voice.AgentSession({
2719
stt: new inference.STT({ model: "deepgram/nova-3", language: "multi" }),
2820
llm: new inference.LLM({ model: "google/gemini-3-flash" }),
@@ -31,7 +23,7 @@ export default defineAgent({
3123
voice: "9626c31c-bec5-4cca-baa8-f8ba9e84c8bc",
3224
}),
3325
turnDetection: new livekit.turnDetector.MultilingualModel(),
34-
vad: ctx.proc.userData.vad! as silero.VAD,
26+
vad,
3527
voiceOptions: {
3628
allowInterruptions: true,
3729
preemptiveGeneration: true,

0 commit comments

Comments
 (0)