crooked-dawn-90821
09/24/2025, 2:27 PMOSError: There was a specific connection error when trying to load livekit/turn-detector:
401 Client Error: Unauthorized for url: <https://huggingface.co/livekit/turn-detector/resolve/v1.2.2-en/config.json> (Request ID: Root=1-68d3ffa3-22c7613944796cfb139c61b3;d045e286-5a00-4302-b0ea-e2730f154c1e)tall-airline-16756
09/24/2025, 2:27 PMtall-airline-16756
09/24/2025, 2:28 PMHF_TOKEN environment variable is set with a valid Hugging Face token. You can do this by running:
`export HF_TOKEN=your_hugging_face_token
python agent.py download-files`Alternatively, you can include it directly in the command like this:
HF_TOKEN=your_hugging_face_token python agent.py download-files
2. Accept Model Repository Terms: Head over to <HUGGING_FACE_MODEL_URL> and click on "Agree and access repository" to make sure your account has permission to access the model files.
3. Run the Correct Command: Double-check that you’re running the download command from the right script file:
python agent.py download-files
4. Verify Plugin Registration: Make sure the turn detector plugin is properly imported and registered in your agent code.
5. Check Network and Dependencies: Confirm that your environment has internet access and that necessary packages like huggingface-hub are installed.
6. Verify Token Permissions: Lastly, ensure your Hugging Face token has the right permissions to access private or gated repositories.
Once you’ve gone through these steps, you should be able to download the model files without any trouble. If you run into any other issues or have questions, please don’t hesitate to reach out—I’m here to help!
Sources: LiveKit turn detector plugin | LiveKit Docs | livekit-plugins/livekit-plugins-turn-detector/livekit/plugins/turn_detector... | plugins/livekit/src/hf_utils.test.ts | common/arg.cpp