All projects

audio/dsp

Real-time call denoiser

A small macOS app that removes background noise from my microphone in real time, so Zoom, Meet or a softphone only hear my voice.

Runs locally on macOS. The code lives in the VAD-ASR repo.

Real-time call denoiser: overview card
PESQ-WB with GTCRN on 60 real noisy VoiceBank-DEMAND files (higher is better)
2.19 → 2.66PESQ-WB with GTCRN on 60 real noisy VoiceBank-DEMAND files (higher is better)
SI-SDR with DTLN on the same files, the best signal fidelity of the three
8.6 → 17.3 dBSI-SDR with DTLN on the same files, the best signal fidelity of the three
of one CPU core for GTCRN on an M-series MacBook Air, against ~23% for DeepFilterNet3
~3%of one CPU core for GTCRN on an M-series MacBook Air, against ~23% for DeepFilterNet3
added latency with the per-frame engines (GTCRN, DTLN). DeepFilterNet3 adds ~50 ms.
~32 msadded latency with the per-frame engines (GTCRN, DTLN). DeepFilterNet3 adds ~50 ms.

What it is

Calling apps take whatever the microphone hears. I wanted to clean the audio once, before any of them see it, and without changing the apps.

The app captures the real microphone, denoises it, and writes the clean audio to a virtual audio device. The calling app picks that device as its microphone. It ships three interchangeable engines (DeepFilterNet3, GTCRN and DTLN) that trade quality against CPU, and I benchmarked all three on real noisy speech.

How it works

  1. 1

    Capture the microphone

    `run.py live` reads the real microphone (chosen with `--input`) and keeps a buffer of recent audio.

  2. 2

    Denoise block by block

    The chosen engine cleans each block. GTCRN and DTLN carry their conv caches and RNN state from frame to frame, so each hop is exactly one forward pass.

  3. 3

    Write to a virtual mic

    Clean audio goes to BlackHole 2ch, a free virtual audio driver. In Zoom, Meet or a softphone you select BlackHole as the microphone.

  4. 4

    Test on a file first

    `run.py file noisy.wav clean.wav` runs the same pipeline on a recording, so you can A/B listen without any audio hardware.

Decisions and trade-offs

Re-running 200 ms of audio every hop

DeepFilterNet3's convolutions carry temporal context that gets zero-padded at chunk boundaries, so cheap per-frame streaming isn't possible without rewriting its state. For each ~40 ms output block it re-runs over ~200 ms of recent audio and keeps only the new block. That costs CPU, not latency.

GTCRN for calls

On 16 kHz call audio GTCRN had the best perceptual quality (PESQ 2.66) at about 3% CPU, so it's the engine I recommend. DeepFilterNet3 is a 48 kHz model and ran on upsampled audio in this test, which handicaps it.

A virtual device, not an integration

Because the output is an ordinary audio input, any calling app works unchanged. Nothing has to know the denoiser exists.

A port checked bit for bit

My GTCRN port reproduces the upstream reference's streamed output bit for bit, so its quality numbers are the model's, not an artefact of the port.