Overview
RNNoiseFilter is an audio processor that reduces background noise in real-time audio streams using RNNoise, a recurrent neural network for audio noise reduction. It inherits from BaseAudioFilter and processes audio frames via the pyrnnoise library.
RNNoise is a free, open-source noise suppression solution that requires no API keys or external services.
Installation
The RNNoise filter requires additional dependencies:Constructor Parameters
Quality of the internal resampler used when the transport sample rate differs from 48kHz. One of
"VHQ" (Very High Quality), "HQ" (High Quality), "MQ" (Medium Quality), "LQ" (Low Quality), or "QQ" (Quick). Defaults to "QQ" for lowest latency.Input Frames
Specific control frame to toggle filtering on/off
Usage Example
Notes
- No API key or external service required (fully local processing)
- RNNoise operates at 48kHz internally; automatic resampling is applied for other sample rates
- Handles 16-bit PCM audio format
- Can be dynamically enabled/disabled via
FilterEnableFrame - Buffers audio to match RNNoise’s required frame length (480 samples)
- When resampling is needed, uses SOXR (install with
pip install "pipecat-ai[soxr]")