Do I need to call the download-files command only ...
# ask-ai
w
Do I need to call the download-files command only once whenever I am starting the worker?
t
Thanks for reaching out, Arthur. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Just a quick heads-up: before you start the worker for the first time, you'll want to run the
download-files
command once. This will grab all the model files needed for plugins like the turn detector. After that, you’re all set and won’t need to run
download-files
again—unless you want to update the models or if the files get deleted. Easy, right? Sources: livekit-plugins/livekit-plugins-turn-detector/README.md
w
Is there any reason why it wasn't working, and I had to run the command every time I started the worker?
t
Hey! If you find yourself running the
download-files
command every time the worker starts, it might mean the files aren’t sticking around between restarts. This could be happening because: • The files are saved in a temporary folder that gets wiped out on restart. • The worker environment resets or reinitializes, which clears out the downloaded files. • There might be permission issues stopping the files from being saved properly. To fix this, try making sure the files are saved in a persistent directory that the worker can access even after restarting. If you want, I’m here to help you sort this out! Sources: livekit-agents/livekit/agents/worker.py | pkg/agentfs/examples/python.uv.Dockerfile | Voice AI quickstart | LiveKit Docs
w
Could it be because of me using a virtual environment in python? However, I think it still persists so I am not sure that will be the case
t
Hey there! Just a heads-up—using a virtual environment in Python might be causing this issue if it’s getting re-created or reset every time you start the worker. That could mean any downloaded files saved inside the virtual environment’s folder might be disappearing. To check if that’s the case, try saving your downloaded files somewhere outside the virtual environment, ideally in a spot that sticks around even when the worker restarts. If you’re still running into trouble after that, there could be other things going on, like file permissions or some settings specific to your environment. Feel free to reach out if you want me to help you dig a little deeper!