<#C088ZNU7QQ5|ask-ai> typescript agent: Should dow...
# ask-ai
f
#ask-ai typescript agent: Should download-files download a file for Noise/Background Voice Cancellation?
t
Thanks for reaching out, Steve. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Absolutely! The
download-files
function in LiveKit's TypeScript agent is designed to help you download the necessary model files for Noise and Background Voice Cancellation (BVC) smoothly. Here's how you can get started: • First, make sure to install the
@livekit/noise-cancellation-node
package. • Next, add a
download-files
script to your
package.json
to easily trigger the model downloads. • Then, run
pnpm download-files
(or the equivalent command) during your build process to cache the models before runtime. If you have any questions or need a hand with the setup, just let me know—I’m here to help! Sources: plugins/livekit/src/hf_utils.ts | pkg/agentfs/examples/node.Dockerfile | Voice AI quickstart | LiveKit docs
f
I've done that, and I don't think it downloaded the noise cancellation model. How can I verify?
t
Let's make sure your noise cancellation model downloaded successfully together. Here’s a simple way to check: 1. Run the
download-files
command:
After adding the script to your
package.json
, please run the command (like
pnpm download-files
). This step is key to getting those files. 2. Look out for initialization errors: Try initializing the agent with noise cancellation turned on. If the model files aren’t there, the agent will let you know with an error message about missing files. 3. Double-check explicitly: You can use the
localFileOnly: true
option in your model-loading function to verify if the files are present locally. If you see a "file not found" error, it means the model didn’t download properly. If you hit any bumps or have questions while going through these steps, please don’t hesitate to reach out—I’m here to help you! Sources: .cursor/rules/agent-core.mdc | SIP troubleshooting guide | LiveKit Docs | Voice AI quickstart | LiveKit docs
f
That's the point: During session initialisation I am seeing 'error: failed to fetch server settings: http status 404' and 'not authenticated'. This only happens when I try and use Noise/Background Voice Cancellation. I do not see evidence that download-files has actually downloaded the files.
t
I'm sorry to hear you're running into those errors ('failed to fetch server settings: http status 404' and 'not authenticated'). These usually point to some configuration or credential issues rather than the Noise/Background Voice Cancellation (BVC) feature itself. Let’s work through this together with a few troubleshooting steps: 1. Verify environment variables: Please double-check that
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
are correctly set up in your environment. 2. Check external service URLs: If you’re using plugins like Beyond Presence, make sure the API URL (for example,
api.bey.dev
) is accurate and accessible. 3. Test without BVC: Try starting the session without enabling BVC to see if the issue is related to the session setup or audio processing. 4. Inspect logs: Take a look at the logs for any extra error details that might point to misconfigured endpoints or missing credentials. Please feel free to reach out if the problem continues or if you'd like a hand walking through any of these steps—I’m here to help! Sources: examples/src/frontdesk/frontdesk_agent.ts | Agent deployment CLI reference | LiveKit Docs | SIP troubleshooting guide | LiveKit Docs | examples/voice_agents/langgraph_agent.py
f
You've caught up to my process so far.
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!