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

FilterEnableFrame
Frame

Specific control frame to toggle filtering on/off

# Disable noise reduction
await task.queue_frame(FilterEnableFrame(False))

# Re-enable noise reduction
await task.queue_frame(FilterEnableFrame(True))

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,
    ),
)

Audio 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