narrow-ice-25787
10/01/2025, 11:09 AMtall-airline-16756
10/01/2025, 11:09 AMtall-airline-16756
10/01/2025, 11:09 AMnarrow-ice-25787
10/01/2025, 11:10 AMtall-airline-16756
10/01/2025, 11:10 AMnoise_suppression: true, you activate the built-in WebRTC suppression features.
Just a quick tip: make sure your agent code doesn’t include any references to enhanced noise cancellation plugins (like noise_cancellation.BVC()) that you might see in cloud examples.
If you’d like, I’m here to help you configure these options in your frontend or agent code—just let me know!
Sources: Voice AI quickstart | LiveKit Docs | Voice AI quickstart | LiveKit Docs | Noise & echo cancellation | LiveKit Docs | livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyinarrow-ice-25787
10/01/2025, 11:11 AMtall-airline-16756
10/01/2025, 11:11 AMnoiseSuppression boolean property that’s set to true by default. You can easily turn it on or off depending on what you need when connecting your client.
• AudioSourceOptions: For the best audio experience, you can adjust these settings:Usually, it’s a good idea to keep these options enabled to maintain clear audio.
◦ `noiseSuppression`: Switch WebRTC-based noise suppression on or off.
◦ `echoCancellation`: Choose whether to enable echo cancellation.
◦ `autoGainControl`: Decide if you want automatic gain control enabled.
If you'd like, I can provide some specific code examples or help you further with this—just let me know!
Sources: src/room/track/options.ts | Noise & echo cancellation | LiveKit Docsnarrow-ice-25787
10/01/2025, 11:12 AMtall-airline-16756
10/01/2025, 11:12 AMimport { createLocalAudioTrack } from 'livekit-client';
// Enable noise suppression (this is usually the default)
const audioTrack = await createLocalAudioTrack({
noiseSuppression: true, // typically true by default
echoCancellation: true,
autoGainControl: true,
});
// Or if you'd like to disable noise suppression
const noisyTrack = await createLocalAudioTrack({
noiseSuppression: false,
});
You can also include these options when connecting to a room:
room.connect('wss://your-livekit-url', token, {
audioCaptureOptions: {
noiseSuppression: true,
echoCancellation: true,
},
});
Flutter SDK: AudioCaptureOptions
final options = AudioCaptureOptions(
noiseSuppression: true,
echoCancellation: true,
autoGainControl: true,
);
final localAudioTrack = LocalAudioTrack(options: options);
Native SDKs (Rust, Node.js, Python): AudioSourceOptions
Rust example:
let options = AudioSourceOptions {
noise_suppression: true,
echo_cancellation: true,
auto_gain_control: true,
};
Node.js example:
const options = new AudioSourceOptions({
noiseSuppression: true,
echoCancellation: true,
autoGainControl: true,
});
Python example:
from livekit.rtc import AudioSourceOptions
options = AudioSourceOptions(
noise_suppression=True,
echo_cancellation=True,
auto_gain_control=True,
)
If you have any questions or need examples for a specific platform, please don’t hesitate to ask — I’m here to help!
Sources: Enhanced noise cancellation | LiveKit Docs | Client SDKs | livekit/livekit_composite | DeepWiki | src/room/track/options.ts | lib/src/track/options.dart | webrtc-sys/src/audio_track.cppnarrow-ice-25787
10/01/2025, 11:13 AMtall-airline-16756
10/01/2025, 11:14 AMkrispEnabled option when you're configuring your SIP trunks or participants:
For Inbound Calls:
await client.createSIPInboundTrunk({
allowedAddresses: ['192.0.2.0'],
krispEnabled: true, // Enable noise cancellation
});
For Outbound Calls:
await client.createSIPParticipant({
fromNumber: '+1234567890',
toNumber: '+0987654321',
krispEnabled: true, // Enable noise suppression
});
Note: The AudioSourceOptions is specifically for WebRTC tracks and doesn’t apply to SIP connections. For SIP, the audio processing happens server-side through Krisp integration, which offers excellent noise and voice cancellation.
If you have any questions or need more examples, please feel free to ask—I’m here to help!
Sources: packages/livekit-server-sdk/src/SipClient.ts | SIP overview | LiveKit Docsnarrow-ice-25787
10/01/2025, 11:14 AMtall-airline-16756
10/01/2025, 11:15 AMkrispEnabled flag in your trunk or participant configurations.
If you're working with a self-hosted setup and need advanced noise cancellation, you might want to consider third-party solutions or look into custom noise suppression options outside of LiveKit's built-in features.
I'm here to help, so please feel free to reach out if you'd like some guidance on alternative approaches or if you have any other questions!
Sources: krisp-minimal/README.md | livekit-protocol/livekit/protocol/analytics.pyi | livekit/livekit_analytics.pb.go | SIP overview | LiveKit Docs | README.mdnarrow-ice-25787
10/01/2025, 11:16 AMtall-airline-16756
10/01/2025, 11:17 AMnoiseSuppression and echoCancellation. These are turned on by default for client-side tracks and you can easily tweak them using AudioCaptureOptions in the SDKs. For instance, in JavaScript:
room.localParticipant.setMicrophoneTrackSettings({
noiseSuppression: true,
echoCancellation: true
});
This is a simple, local solution that doesn’t require extra libraries and works right out of the box. While it might not be as powerful as AI-based models like Krisp, it’s still a solid option to consider.
2. Custom Audio Processing in Native SDKs:
If you’re looking for something more advanced, you can explore custom noise cancellation through LiveKit’s native SDKs. For example, in the Rust SDK, you can use the AudioProcessingModule from libwebrtc to enable noise suppression, echo cancellation, and auto gain control right at the audio capture stage:
let options = AudioSourceOptions {
noise_suppression: true,
echo_cancellation: true,
auto_gain_control: true,
};
This method opens the door to integrating third-party noise suppression libraries or even your own AI models. Just a heads-up though, it does require some advanced audio engineering skills and unfortunately isn’t applicable for SIP connections.
Limitations for SIP Connections:
When it comes to SIP-based calls, Krisp remains the only officially supported noise cancellation option. You can enable it using the krisp_enabled: true flag here:
• CreateSIPParticipant API (for outbound calls)
• Inbound trunk configuration (for inbound calls)
Currently, there’s no way to turn on WebRTC noise suppression on SIP media paths or to plug in other AI noise filters for SIP calls.
If you’d like, I’m here to help walk you through implementing these options or brainstorming custom solutions that fit your needs. Just let me know!
Sources: Noise & echo cancellation | LiveKit Docs | examples/local_audio/src/main.rs | SIP overview | LiveKit Docs | SIP APIs | LiveKit Docs | Enhanced noise cancellation | LiveKit Docs