Overview

NoisereduceFilter is an audio processor that reduces background noise in real-time audio streams using the noisereduce library. It inherits from BaseAudioFilter and processes audio frames to improve audio quality by removing unwanted noise.

Installation

The noisereduce filter requires additional dependencies:

pip install pipecat-ai[noisereduce]

Constructor Parameters

This filter has no configurable parameters in its constructor.

Input Frames

AudioRawFrame
Frame
required

Raw audio data for noise reduction processing

FilterControlFrame
Frame

Control frames to enable/disable filtering

FilterEnableFrame
Frame

Specific control frame to toggle filtering on/off

Output Frames

AudioRawFrame
Frame

Processed audio data with reduced background noise

Usage Example

transport = DailyTransport(
    room_url,
    token,
    "Respond bot",
    DailyParams(
        audio_in_filter=NoisereduceFilter(), # Enable noise reduction
        audio_out_enabled=True,
        vad_enabled=True,
        vad_analyzer=SileroVADAnalyzer(),
        vad_audio_passthrough=True,
    ),
)

Frame Flow

Notes

  • Lightweight alternative to Krisp for noise reduction
  • Supports real-time audio processing
  • Handles PCM_16 audio format
  • Thread-safe for pipeline processing
  • Can be dynamically enabled/disabled
  • No additional configuration required
  • Uses statistical noise reduction techniques