Sorry if there was any confusion earlier! I did answer your questions in detail, but let me quickly recap to make things clearer:
1.
Does the MultilingualModel require PyTorch/TensorFlow/Flax to be installed, even if it's just imported but not instantiated?
I’m not 100% sure on this one—it might depend on how the module handles imports behind the scenes.
2.
Does preloading livekit.plugins.turn_detector during worker startup try to initialize both models regardless of which one is actually used?
Nope! Only the model you specify (like EnglishModel or MultilingualModel) gets initialized during startup.
3.
Why would the inference executor timeout during initialization when PyTorch is missing?
I couldn’t find exact details, but it’s probably related to how the executor deals with missing dependencies or resource setup.
4.
How do I configure the worker to load only the English model?
You can do this by importing and initializing just the EnglishModel, like so:
from livekit.plugins.turn_detector.english import EnglishModel
session = AgentSession(
turn_detection=EnglishModel(),
# ... other configurations
)
If anything’s still unclear or you have more questions, just give me a shout—I’m here to help!