what is krisp noise cancellation and how does it w...
# ask-ai
r
what is krisp noise cancellation and how does it work ?
t
Thanks for reaching out, Saurabh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’ll explain what Krisp noise cancellation is and how it works, and highlight practical trade-offs and where you can enable it. What Krisp noise cancellation is • Krisp is an AI-powered noise cancellation feature in LiveKit that removes background noise from audio streams to improve speech clarity for call participants and downstream services like speech-to-text (STT). How it works (where it can run) • On SIP trunks: Setting
krisp_enabled: true
in
SIPInboundTrunkInfo
processes incoming audio from phone callers to remove background noise before forwarding it into the LiveKit room. • In client apps: Use the
@livekit/krisp-noise-filter
package (v^0.3.0) in frontends (for example, Next.js) to apply noise cancellation directly in the browser. • In agents: Noise cancellation can be applied in agent logic — for SIP/telephony participants using
BVCTelephony()
and for WebRTC participants using
BVC()
— to filter out background sounds and non-primary speakers. Practical trade-offs and best practices • CPU usage: Krisp improves audio quality but consumes significant CPU, especially on low-powered devices. Consider disabling Krisp when CPU constraints are likely to impact performance. • Avoid double-processing: Don’t enable Krisp at multiple points for the same audio path (for example, both on the SIP trunk and again in the agent/frontend). Double-processing can degrade audio quality and reduce STT accuracy. • Where to enable: Choose a single, appropriate location to apply Krisp depending on your architecture — at the trunk for phone callers, in the client for browser users, or in agent telephony logic for call-center flows. When to use Krisp • It’s especially valuable in noisy environments (call centers, public spaces) where clear audio and accurate STT are important. If you’d like, I can: • Help you decide the best place to enable Krisp for your setup (SIP trunk vs client vs agent) — tell me about your architecture (are callers joining via SIP, web clients, or both?). • Provide example code or configuration for enabling Krisp in the frontend, SIPInboundTrunkInfo, or agent logic. Sources: sip | livekit/livekit_composite | DeepWiki | examples/voice_agents | livekit/livekit_composite | DeepWiki | Choosing the right noise cancellation for your agent | LiveKit | Optimizing Video Calls for Low-Powered Devices | LiveKit | Turns overview | LiveKit Documentation
a
can we use this feature
BVCTelephony
of BVC in a SIP call even on self hosted livekit environment?
t
Thanks — great question. Yes, you can use the
BVCTelephony
noise cancellation feature for SIP calls in a self‑hosted LiveKit environment. What this means •
BVCTelephony()
is optimized for narrow‑band telephony audio (typical 8 kHz sample rate) used by SIP/phone callers. • It runs on the agent side (as part of the LiveKit noise cancellation plugins) and therefore does not depend on LiveKit Cloud — it works with self‑hosted LiveKit because the processing is performed by your agent code locally. Implementation notes and best practices • Apply
noise_cancellation.BVCTelephony()
only when the participant’s kind is
SIP
so you use the telephony-optimized model for those streams. • Detect participant type in your agent and apply the appropriate filter dynamically (e.g.,
BVCTelephony
for SIP,
BVC()
for WebRTC). • Disable other server- or trunk-level noise cancellation for the same audio path (for example, set
krisp_enabled=false
on the trunk) to avoid double-processing, which can degrade audio quality and STT accuracy. • Monitor CPU: Krisp/BVC-style processing can use significant CPU on low-powered machines; if you see CPU constraints, consider where to place processing or disable it selectively. If you want, I can: • Provide a short code example showing how to detect SIP participants and call
BVCTelephony()
in your agent. • Help you choose whether to run noise cancellation in the agent vs. at the trunk or client for your architecture — tell me whether callers join by SIP only, web only, or a mix. Sources: Choosing the right noise cancellation for your agent | LiveKit