microscopic-dress-75199
10/14/2025, 10:20 PMtall-airline-16756
10/14/2025, 10:20 PMtall-airline-16756
10/14/2025, 10:20 PMmicroscopic-dress-75199
10/14/2025, 10:20 PMtall-airline-16756
10/14/2025, 10:21 PMAudioCaptureOptions in the LiveKit SDKs when you establish a connection.
If advanced noise cancellation is a must for your self-hosted environment, you might want to consider exploring third-party audio processing libraries or possibly using LiveKit Cloud where this feature is fully supported.
I'd be happy to help you get started with basic WebRTC noise suppression in your self-hosted setup or assist you in integrating a third-party noise cancellation tool—just let me know what you'd prefer!
Sources: Voice AI quickstart | LiveKit Docs | README.md | krisp-minimal/README.md | README.md | Development Tools | livekit/livekit_composite | DeepWikimicroscopic-dress-75199
10/21/2025, 8:44 PMtall-airline-16756
10/21/2025, 8:46 PMAudioCaptureOptions in the SDKs.
• Agent-Side Noise Cancellation: Another great option is to implement noise cancellation right in your agent code with NoiseCancellationOptions. This lets you process inbound audio streams on the server side.
• Third-Party Solutions: While not directly supported out of the box, you might consider integrating third-party libraries like RNNoise or other open-source tools for more advanced noise cancellation. Just a heads-up, this would involve some custom development.
Just a quick note: the enhanced Krisp-based noise cancellation is currently exclusive to LiveKit Cloud and isn’t available for self-hosted setups.
If you’d like, I’m here to help guide you through configuring WebRTC noise suppression, setting up agent-side noise cancellation, or exploring third-party options. Just let me know what works best for you!
Sources: Voice AI quickstart | LiveKit Docs | Noise & echo cancellation | LiveKit Docs | examples/local_audio/src/main.rs | livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi | rag/main.pymicroscopic-dress-75199
10/21/2025, 9:54 PMtall-airline-16756
10/21/2025, 9:56 PMmicroscopic-dress-75199
10/21/2025, 9:56 PMtall-airline-16756
10/21/2025, 9:58 PMfrom livekit.rtc import AudioProcessingModule
apm = AudioProcessingModule(
echo_cancellation=True,
noise_suppression=True,
high_pass_filter=True,
auto_gain_control=True
)
apm.process_stream(audio_frame)
apm.process_reverse_stream(far_end_audio_frame)
1. Configure SIP Server: It’s important to make sure your SIP server is set up correctly with the right signaling and media ports. Here’s an example configuration to guide you:
# sip-config.yaml
api_key: your-livekit-api-key
api_secret: your-livekit-api-secret
ws_url: ws://your-livekit-server:7880
redis:
address: your-redis-server:6379
sip_port: 5060
rtp_port: 10000-20000
1. Run SIP Server: Once everything is configured, you can start your SIP server like this:
sip --config=sip-config.yaml
By following these steps, you’ll have WebRTC’s default noise suppression working smoothly for your SIP telephony setup. If you’d like more tailored advice for your specific programming language or environment, just let me know—I’m here to help!
Sources: Enhanced noise cancellation | LiveKit Docs | livekit-rtc/livekit/rtc/_proto/audio_frame_pb2.pyi | Noise & echo cancellation | LiveKit Docs | Self-hosted SIP server | LiveKit Docs | pkg/rtc/config.gomicroscopic-dress-75199
10/21/2025, 10:06 PMtall-airline-16756
10/21/2025, 10:08 PMfrom livekit.plugins import noise_cancellation
from livekit.agents import RoomInputOptions
await session.start({
agent: agent,
room: ctx.room,
room_input_options: RoomInputOptions(
noise_cancellation=noise_cancellation.BVC(),
),
})
1. Handle SIP Participants: It’s a good idea to use different noise cancellation models depending on whether the participant is SIP or WebRTC. Here’s how you might do that:
participant = await ctx.wait_for_participant()
filter = noise_cancellation.BVC()
if participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP:
filter = noise_cancellation.BVCTelephony()
1. Configure SIP Trunks: Make sure your SIP trunks are set up correctly with the right signaling and media ports. Here’s an example configuration to guide you:
{
"trunk_id": "my-inbound-trunk",
"name": "My Inbound Trunk",
"numbers": [
"+1-510-555-0100"
],
"allowed_addresses": [
"192.168.1.100"
],
"auth_username": "myusername",
"auth_password": "mypassword",
"krisp_enabled": true
}
Following these steps should set you up nicely with noise suppression in your voice agent. If you run into any questions or want some help with specific deployment details, just let me know—I’m here to help!
Sources: Noise & echo cancellation | LiveKit Docs | complex-agents/teleprompter/teleprompter-frontend/components/room.tsx | examples/src/realtime_turn_detector.ts | Using Noise Cancellation for SIP and WebRTC Participants | Enhanced noise cancellation | LiveKit Docs