model · audio essentials

Open source · Apache-2.0

Nearfield keeps the caller's voice and removes everything else.

A real-time filter for voice agents and phone calls. It keeps the voice closest to the microphone and removes the noise and the other people talking in the room, as the call happens, on one CPU thread. Try it below on your own voice: it runs in this browser tab.

benchmark · real recordings

Nearfield beats Krisp and Sanas on Krisp's own benchmark.

Krisp published 265 real recordings of people on headsets, call-centre floors and phones, with someone else talking in the room. Each filter cleans them, a speech recogniser transcribes the result, and the transcript is checked against what the caller said. Both Nearfield models make fewer word errors than Krisp and Sanas, and let fewer of the background voice's words through. Nearfield is 2.5 MB and its weights are open.

#Model*AccessWord error rateBackground words per minute
1Nearfield best, 80 ms delayopen4.99%0.36
2Nearfield fast, 48 ms delayopen5.01%0.70
3Krisp VI 2.5 Defaultpaid5.30%1.52
4Krisp VI 2.5 Litepaid6.21%4.52
5ai-coustics Voice Focus 2.2 Lpaid6.84%0.66
6Sanas Voice Isolationpaid9.38%13.76
7DeepFilterNet3open13.30%22.77
No filter23.21%66.47

* Open models under 50 MB and the paid filters (known sizes: Nearfield 2.5 MB, DeepFilterNet3 about 8 MB, ai-coustics Voice Focus 2.2 L about 20 MB; Krisp and Sanas do not publish one).

Krisp's Voice Isolation benchmark: 265 real recordings with other people talking in the room, scored with Krisp's published method. Lower is better in both columns. Background words are words the recogniser writes while only a background voice is talking. We ran the Nearfield, Krisp and no-filter rows. The ai-coustics, Sanas and DeepFilterNet3 rows are from The Voice on the Line, which scores the same way. Gaps of a few tenths of a point are within noise, and this version of Nearfield was tuned against this benchmark, though never trained on its recordings.

Hear it on your own audio

Nearfield v2.3.0 · runs in your browser

Run the example call at one of five background levels, from quiet room noise up to a room full of people talking. Or record from your mic with a TV or a podcast playing behind you, or open a recording. The original and cleaned waveforms build up together, 8 ms at a time, the way a live call would be processed. Then play either one and compare.

Example call · background level

Pick a level to run it. It is the same support call each time: the caller reports a damaged order and gives an order number (472916), an email address (maya.fernandes@example.com) and a phone number (555 0142). Listen for whether they come through.

Or your own audio

Press a button to start. The model (about 13 MB) loads then, once, and runs entirely in this tab.

OriginalCleaned · NearfieldKept, by frequency
Pick an example level, record, or open a file.
Model

Same size, same speed. The best model waits 32 ms longer before it commits to each moment, and lets fewer background words through. Switching runs the same audio again.

Clean-up after the model

Switching between original and cleaned while it plays keeps your place. Click the waveform to seek. The delay a live call would have is 48 ms with the fast model and 80 ms with the best one.

Everything runs in this browser tab. Nothing you record or open is uploaded.

Add the upscaler

Nearfield works at 16 kHz, so everything above 8 kHz is gone. Our Audio Upscaler can rebuild it after cleaning, for 48 kHz output. Two stretches of the example call, rendered both ways.

Sample
Nearfield
Upscale

Example call, as recorded

Spectrogram: Example call, as recorded

Example call, cleaned by Nearfield, upscaled to 48 kHz

Spectrogram: Example call, cleaned by Nearfield, upscaled to 48 kHz

Change a setting while a clip plays and it carries on from the same moment, so you can hear the difference.

The wrong person keeps getting answered

Someone calls a voice agent from a café. Behind them a TV is on, and two people at the next table are arguing about a football match.

The agent hears all of it. It answers the TV. It treats a stranger's sentence as the caller's next turn. It waits for a pause that never comes, because somebody in the room is always talking. The caller says “no, I didn't say that” and the call falls apart.

Noise suppression doesn't fix this. It was built to remove things that aren't speech, and the TV and the next table are speech. What the agent needs is something that knows which voice is the caller: the one right up against the microphone. Nearfield is that filter.

word error rate on 265 real recordings with the best model. Krisp VI 2.5 scores 5.30%, no filter 23.21%
4.99%word error rate on 265 real recordings with the best model. Krisp VI 2.5 scores 5.30%, no filter 23.21%
added delay with the fast model, the default, which scores 5.01%. The best model takes 80 ms
48 msadded delay with the fast model, the default, which scores 5.01%. The best model takes 80 ms
of one CPU thread per second of audio
0.2 sof one CPU thread per second of audio
one ONNX model, about 628,000 weights, 16 kHz
2.5 MBone ONNX model, about 628,000 weights, 16 kHz

How it works

The first version asked, for each frequency band, whether it belonged to the caller or the room, and turned bands up or down. That fails when another person is talking, because two voices share the same bands. Version 2 is a new model, trained from scratch by us, that separates the voices instead.

  1. 01

    Turn the sound into frequencies

    The call is cut into short overlapping slices, one every 8 ms, and each slice is turned into its spectrum. The spectrum is grouped into 64 bands, finer at the low frequencies where voices differ most.

  2. 02

    Follow each voice

    A small recurrent network reads the bands. In each of its four blocks it reads across the frequencies of one slice to see what belongs together, then along time, forwards only, to follow each voice from one slice to the next.

  3. 03

    Keep the caller

    For every slice it writes a mask: how much of each frequency to keep, and how to shift it. Applying the mask leaves the caller. A light clean-up then steadies the volume and quietens the pauses between words.

The whole thing is one 2.5 MB ONNX model with about 628,000 weights, and it comes with two sets of weights. The fast one waits 16 ms before it commits to a slice, so the cleaned audio arrives 48 ms after the original. The best one waits 48 ms, arrives 80 ms after, and lets about half as many background words through. Fast is the default and one setting switches to best. Either takes about 0.2 seconds of one CPU thread per second of audio. It works at 16 kHz; phone lines and wideband calls are resampled in and out. The weights are open. The training code is not.

What changed in version 2.3

Earlier versions decided who the caller was by how close they sounded. That was a hidden cutoff. A caller on a car's hands-free or a speakerphone sounded far away, and the model muted them. On the benchmark above, version 2.2 scored 7.83%, almost all of it from a few callers who were silenced entirely.

Version 2.3 is the same network retrained with a different rule: the caller is the nearest voice heard so far in the call, however far away that is. It was also trained on minute-long calls with long pauses, on quiet callers, and on audio that a phone or headset has already processed.

Simulated calls

Before the real recordings, we measured on calls we built ourselves. We mixed callers with a background talker, babble or steady noise, cleaned the result, and gave it to a speech recogniser. Version 2.3 scores worse than 2.2 on this test. In these clips the background voice is already talking when the caller starts, and version 2.3 keeps that voice until the caller's first word, so it loses more opening words. The real recordings, where it is well ahead, are the better guide to a live call.

Share of the caller's words missing from the transcript (lower is better)

SettingCleanSteady noiseQuieter talkerEqual talkerBabble
No filter2.3%3.1%17.9%41.4%38.4%
Version 1, gentle2.6%3.3%8.8%30.9%40.3%
Version 1, balanced2.4%2.8%12.5%31.3%51.2%
Version 2.0, 128 ms delay2.3%4.4%5.4%13.9%32.2%
Version 2.2 fast, 48 ms delay2.0%3.3%6.1%15.9%37.0%
Version 2.2 best, 80 ms delay1.8%3.5%5.4%13.6%30.9%
Version 2.3 fast, 48 ms delay2.0%3.3%6.8%19.7%35.9%
Version 2.3 best, 80 ms delay2.4%4.3%7.2%17.3%34.6%

How it was measured

40 callers per condition reading English sentences, mixed with a background talker, babble or steady noise, sent through an 8 kHz phone line and transcribed by Whisper large-v3-turbo. Gaps under about 5 points are within noise. The no-filter and version 1 rows are the ones published with v1.1.0; the version 2 rows were scored later on the same clips with the same recogniser.

What else we measured

When only one background voice is talking and no caller has spoken yet, version 2.3 keeps it: it is the nearest voice so far. Babble with no caller is turned down only a little, and a third to a half of those clips still produce a transcript. Version 2.2 silenced both. On version 2.2, while the caller talks, an equally loud background voice comes out about 16 dB quieter and the caller about 4 dB quieter, measured on the model output before the clean-up stage.

Limits

  • Babble is still hard.With a whole room talking at the caller's level, about 35 in 100 of the caller's words are still lost. No filter loses 38. A room of babble with no caller yet is no longer silenced.
  • A voice before the caller gets through.If a TV or a colleague is audible before the caller's first word, you will hear them until the caller starts. The model cannot know a closer voice is coming. Version 2.2 silenced them, and silenced some real callers too.
  • One real benchmark.The real-recording figures come from a single public set, and this version was tuned against it. Other rooms and lines will differ, which is why the demo above runs on your own audio.

Use it

Nearfield is a Python package. The 2.5 MB model ships inside it, so nothing is downloaded at run time. In a Pipecat voice agent it drops in as the transport's input filter.

Install
pip install "nearfield @ git+https://github.com/Ground-State-Foundry/nearfield"
Pipecat
from nearfield.pipecat import NearfieldFilter

transport = DailyTransport(
    room_url, token, "bot",
    DailyParams(
        audio_in_enabled=True,
        audio_in_filter=NearfieldFilter(),  # model="best" for the 80 ms model
    ),
)

Credits and licence

Nearfield is released by Ground State Foundry under the Apache-2.0 licence, code and weights. Version 2 is our own model, trained from scratch. The browser demo runs on ONNX Runtime Web.