Skip to content

Add livekit-plugins-rnnoise (OSS self-hosted noise cancellation)#6477

Open
apoorva-01 wants to merge 8 commits into
livekit:mainfrom
apoorva-01:feat/plugins-rnnoise
Open

Add livekit-plugins-rnnoise (OSS self-hosted noise cancellation)#6477
apoorva-01 wants to merge 8 commits into
livekit:mainfrom
apoorva-01:feat/plugins-rnnoise

Conversation

@apoorva-01

@apoorva-01 apoorva-01 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Right now, if you're self-hosting, there's not really a good built-in option for cleaning up mic noise. Krisp and ai-coustics both require LiveKit Cloud, so self-hosted users are kind of out of luck.

PR adds livekit-plugins-rnnoise - which runs Xiph's RNNoise entirely on-device.
No API keys, no model downloads, no signup required.

Usage is basically the same as the Krisp plugin:

from livekit.plugins import rnnoise

RoomInputOptions(
    noise_cancellation=rnnoise.RNNoise()
)

This has been requested a few times already (#5507, #6033), and it pops up on the forum every now and then too.

Implementation-wise - it's pretty simple: incoming audio gets resampled into RNNoise's required 48kHz/480-sample format, denoised, resampled back, and returned at the exact same frame length it came in. Right now it's mono-only and has a simple enabled flag. It talks directly to the native librnnoise via ctypes instead of using pyrnnoise's Python wrapper, which keeps audiolab, av, and matplotlib out of the runtime path (and avoids the av version pin).

One small annoyance: the prebuilt native library currently comes from pyrnnoise, but that package also declares matplotlib and audiolab for its CLI, so pip installs them even though this plugin never imports them. Not ideal. If you'd rather avoid those extra dependencies, I'm happy to vendor librnnoise directly or work with upstream to move the CLI dependencies behind an optional extra - whatever makes more sense.

For testing, I added unit tests covering the mono guard, passthrough behavior, the same-length guarantee, actual noise reduction, and a regression test that catches anyone accidentally reintroducing the audiolab import. I also tested it in a live agent and on a few offline audio clips. make check and the full unit test suite pass locally.

@apoorva-01
apoorva-01 requested a review from a team as a code owner July 18, 2026 05:44

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@apoorva-01 apoorva-01 changed the title feat: add livekit-plugins-rnnoise (OSS self-hosted noise cancellation) Add livekit-plugins-rnnoise (OSS self-hosted noise cancellation) Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant