File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[project ]
2- subdomain = " local-dev-6l2qilwn "
2+ subdomain = " prod-87bkq8ew "
33
44[agent ]
5- id = " CA_dLp4eDQyTkkD "
5+ id = " CA_nD9UcjrtHQbR "
Original file line number Diff line number Diff line change 11import {
22 type JobContext ,
3- type JobProcess ,
43 ServerOptions ,
54 cli ,
65 defineAgent ,
@@ -14,15 +13,8 @@ import { fileURLToPath } from "node:url";
1413import { createVoiceAgent } from "./agent.js" ;
1514
1615export 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 ,
You can’t perform that action at this time.
0 commit comments