how can we download and host the multilimgual turn...
# ask-ai
b
how can we download and host the multilimgual turn detector model locally
t
Thanks for reaching out, Gaurab. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To download and host the multilingual turn detector model locally, follow these steps: 1. Install the Turn Detector Plugin Run the following command to install the plugin:
Copy code
pip install "livekit-agents[turn-detector]~=1.0"
2. Download Model Files Before running your agent for the first time, download the model files using this command:
Copy code
python agent.py download-files
This will download the necessary components, including: • The tokenizer from the HuggingFace model repository • The ONNX model file (
model_q8.onnx
) • The
languages.json
configuration file 3. Local Hosting Requirements The model is designed to run locally with the following requirements: • RAM: ~400MB • Storage: 281MB on disk • CPU: Runs on CPU with inference time of ~25ms per turn • Concurrency: Supports multiple concurrent sessions 4. Usage Once downloaded, you can use the multilingual model in your agent as follows:
Copy code
from livekit.plugins.turn_detector.multilingual import MultilingualModel

session = AgentSession(
    ...
    turn_detection=MultilingualModel(),
)
The multilingual model supports 13 languages, including English, French, Spanish, German, and more. It runs entirely on your server's CPU, making it suitable for on-premises deployment scenarios. Sources: LiveKit turn detector plugin | LiveKit Docs | examples/voice_agents/mcp/mcp-agent.py