Overview
@seastart/srtc-plugin-deepfilternet is an AI noise suppression plugin based on DeepFilterNet (AudioWorklet + WebAssembly) that implements the SDK’s TrackProcessor interface. Compared with the RNNoise plugin, DeepFilterNet delivers higher noise suppression quality and supports suppression strength adjustable at runtime and a bypass switch; the cost is more computation and larger assets.
Installation
Host the static assets
The plugin depends on two static assets (wasm + model, about 18 MB in total) that you need to self-host:v2/pkg/df_bg.wasmv2/models/DeepFilterNet3_onnx.tar.gz
v2/ structure):
In Vite projects you can also copy them automatically at build time with vite-plugin-static-copy.
Usage
Options
Runtime methods
Trade-offs vs. the RNNoise plugin
Use this plugin when noise suppression quality matters and device performance allows; for low-end devices or when lightweight and low latency matter more, use the RNNoise plugin.
Notes
- Supports audio tracks only.
- Must run over HTTPS (or localhost);
AudioContextmay need a user gesture before it canresume. - The sample rate is fixed at 48 kHz.
- Computation is higher than RNNoise; measure CPU usage and end-to-end latency on your target devices.
- After switching the microphone device (
changeDeviceId) or callingstartCaptureagain, noise suppression resumes automatically; you don’t need to callsetProcessoragain. - Can be chained with other processors; see Audio/video processors.
- License: DeepFilterNet itself is Apache-2.0/MIT; verify the licensing of the model weights yourself before distribution.
The model file itself is gzip. Some servers/proxies add
Content-Encoding: gzip to .gz files again; after the browser decompresses once automatically, the underlying code receives an uncompressed .tar, and initialization crashes (RuntimeError: unreachable). The plugin handles this automatically: when it detects the file was decompressed, it re-gzips it in the browser to restore it, so you don’t need to change server configuration. This relies on CompressionStream (Chrome 80+ / Edge 80+ / Safari 16.4+ / Firefox 113+).