Skip to main content

DeepFilterNet Filter

DeepFilterNetFilter is a Patter AudioFilter backed by the DeepFilterNet3 deep-learning noise suppressor. Like Krisp, it runs as a pre-STT filter in pipeline mode: caller PCM enters the filter, cleaned PCM exits and is forwarded to the STT provider. DeepFilterNet is MIT-licensed and free. Use it as the default OSS noise-suppression option, or where Krisp’s commercial licence isn’t a fit.

Install

DeepFilterNet works natively at 48 kHz; the filter resamples around inference automatically. Heavy deps (torch ~2 GB, model ~60 MB) are opt-in:
TypeScript caveat. DeepFilterNet does not ship an official ONNX export for Node.js at time of writing. The TS filter targets onnxruntime-node and loads any user-supplied deepfilternet.onnx you point it at. If you don’t pass a modelPath, the filter logs a one-time warning and passes audio through unchanged — Patter never fakes enhancement. Once a stable community ONNX export with a streaming-friendly graph is published, point modelPath at it.

Constructor

Usage in a pipeline agent

Plug it into phone.agent(audio_filter=...) / audioFilter::
See the audio_filter parameter on Agents (pipeline mode only).

Resampling

DeepFilterNet operates at 48 kHz. Patter’s pipeline-mode audio bus runs at 16 kHz. The filter resamples up before inference and back down after, so callers see a filter that preserves the input sample rate.
  • Python: linear-interpolation resampler. Per-chunk; the boundary artefact is inaudible in practice.
  • TypeScript: StatefulResampler from audio/transcoding so chunk-boundary samples are not silently discarded. Resamplers are flushed on close().

When to use DeepFilterNet vs alternatives

Notes

  • On any internal error the filter logs and returns the original PCM unchanged — the call audio path is never broken.
  • Install footprint matters: the Python extra adds torch (~2 GB). For a smaller deploy where Python can’t ship torch, use Krisp (proprietary) or the (truly tiny) audio_filter=None baseline.
  • The TS filter is a faithful pass-through when no ONNX model is supplied — by design, so tests and audio-quality metrics stay truthful.

What’s Next

Agents

The audio_filter parameter on phone.agent(...).

Krisp Filter

Proprietary commercial noise suppression.

Silero VAD

Voice activity detection downstream of the filter.

Pipeline mode

STT + LLM + TTS composition.