faint-gold-41196
02/20/2026, 7:40 PMtall-airline-16756
02/20/2026, 7:40 PMtall-airline-16756
02/20/2026, 7:41 PMfrom livekit.plugins import noise_cancellation
filter = (
noise_cancellation.BVCTelephony() # for SIP calls
if participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP
else noise_cancellation.BVC() # for WebRTC
)
1. Node.js / TypeScript
const filter = participant.kind === ParticipantKind.SIP
? TelephonyBackgroundVoiceCancellation()
: BackgroundVoiceCancellation();
Apply the filter when starting the agent session so audio is cleaned before STT.
Important cautions
• Avoid double-processing: If you already run agent-side noise cancellation, set krisp_enabled=False on SIP trunks or client SDKs. Running two noise filters together can degrade audio and reduce STT accuracy.
Why this reduces latency
• Cleaner audio leads to faster, more reliable STT endpointing (less time spent detecting speech).
• Reduces false triggers from background noise so the system avoids extra LLM calls or retries.
• Improves transcription quality, which reduces reprocessing and perceived delays.
Additional practical tips
• Encourage users to speak in longer phrases rather than 1–3 word fragments; short utterances are harder to detect and can increase retry/latency.
• If speech seems overly suppressed, temporarily disable the noise filter to verify it isn’t removing valid speech.
• Always choose the telephony-optimized model (BVCTelephony) for SIP callers for best performance on narrow-band audio.
If you’d like, tell me:
• Are these calls WebRTC, SIP, or a mix?
• Whether you already have any noise cancellation enabled (e.g., krisp) so I can suggest the exact setting changes. Sources: Choosing the right noise cancellation for your agent | LiveKit | Troubleshooting STT not picking up utterances | LiveKit