stocky-oil-29870
11/26/2025, 1:19 PMtall-airline-16756
11/26/2025, 1:19 PMtall-airline-16756
11/26/2025, 1:20 PMturn_detection in `prewarm`: that won't reliably work. Prewarm is for loading heavy, session‑independent resources (e.g., VAD models) into proc.userdata. Turn detection models are session‑level: they depend on runtime session configuration, an active STT stream, and session lifecycle hooks that aren't available during prewarm. The turn detector also may not safely accept a model instance serialized from prewarm into the session.
What you can do instead:
• Use prewarm to load reusable assets (VAD, shared weights) and store them in proc.userdata.
• Instantiate the turn detection model (for example MultilingualModel or EnglishModel) when creating the AgentSession in your entry function and pass it as the turn_detection parameter alongside `stt`/`llm`/`tts`.
To help further, could you share:
• Your language (Python or Node.js)?
• The code you tried in prewarm and any error messages or behavior you saw? Sources: Agent server options | LiveKit docs | Silero VAD plugin | LiveKit docs | Turn detection and interruptions | LiveKit Docs | LiveKit turn detector plugin | LiveKit docs