How to handle background noise in self-hosted agen...
# ask-ai
m
How to handle background noise in self-hosted agents sdk? (only agents are self-hosted)
t
Thanks for reaching out, Soumyadeep. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking how to handle background noise when only your agents are self-hosted. Here's what you can do. Key point • LiveKit's enhanced (Krisp-powered) noise cancellation and background voice cancellation are only available on LiveKit Cloud and are not usable in self-hosted agents. What you can use in self-hosted setups • Use the built-in WebRTC noise suppression and echo cancellation (available in all environments). ◦ Configure at connection time via
AudioCaptureOptions
/ SDK defaults. ◦ Or enable per audio track before publishing (SDKs provide methods like
setNoiseSuppression(true)
). Practical steps (example in JS) 1. Set defaults when creating a Room:
Copy code
const room = new Room({
  audioCaptureDefaults: {
    noiseSuppression: true,
    echoCancellation: true,
  },
});
1. Or enable on a track:
Copy code
track.setNoiseSuppression(true);
If you need stronger noise reduction than WebRTC offers, consider: • Running a third-party or open-source noise-suppression processor locally (e.g., RNNoise, WebRTC AEC/NS with tuned params, or other DSP libraries) and feed the processed audio into the agent. • Preprocessing audio on the client before publishing (if you control the client). Would you like: • help with exact SDK calls for your language (JS, iOS, Android, or others)? • guidance on integrating a specific local noise-suppression library? Sources: Enhanced noise cancellation | LiveKit docs | Voice AI quickstart | LiveKit docs | Noise & echo cancellation | LiveKit docs