Repository navigation
Releases
Nearfield v2.3.0
Both models retrained with a new rule: the caller is the nearest voice heard so far in the call, however far away that is. v2.2 muted callers who sounded far from the microphone (car hands-free, speakerphones, some headsets).
On Krisp's Voice Isolation benchmark (265 real recordings):
| Word error rate | Background words let through, per minute | |
|---|---|---|
Nearfield best v2.3 (80 ms) |
4.99% | 0.36 |
Nearfield fast v2.3 (48 ms) |
5.01% | 0.70 |
| Krisp VI 2.5 Default | 5.30% | 1.52 |
Nearfield fast v2.2 |
7.83% | 0.73 |
Nearfield best v2.2 |
8.37% | 1.02 |
- Trained on 60-second calls with long pauses, quiet callers, and audio a phone or headset has already processed.
clean()no longer needs gigabytes of memory on long recordings.- Behaviour change: a voice that speaks before the caller is let through until the caller's first word. v2.2 silenced it.
- v2.3 was tuned against this benchmark (never trained on its recordings), and gaps of a few tenths of a point are within noise. See the README for the full table, sources and caveats.
Same API, same size (2.5 MB each), same speed. Nothing changes for existing code.
Nearfield v2.2.0
Two models in one package, same size and speed.
fast(the default): 48 ms of delay. The same weights as v2.1.0.best: 80 ms of delay. Loses 13.6% of the caller's words against an equally loud background talker (fast: 15.9%) and 30.9% in babble (fast: 37.0%).
Switch with Nearfield(model="best"), NearfieldFilter(model="best"), clean(audio, sr, model="best"), or the environment variable NEARFIELD_QUALITY=best. Nothing changes for existing code.
Nearfield v2.1.0
v2.1 cuts the delay from 128 ms to 48 ms. It is the same design as v2.0, retrained with 16 ms of look-ahead instead of 96 ms.
- 48 ms of delay: a 32 ms analysis window plus 16 ms of look-ahead.
- Same size and speed: 2.5 MB, about 0.2 s of compute per second of audio on one CPU thread.
- Same code and clean-up stage. Only the weights and the look-ahead changed.
What it costs, as the share of the caller's words a speech recogniser lost:
| Equal talker | Babble | |
|---|---|---|
| No filter | 41.4% | 38.4% |
| v2.0 (128 ms) | 13.9% | 32.2% |
| v2.1 (48 ms) | 15.9% | 37.0% |
Gaps under about 5 points are within noise on this test. If you can afford 128 ms, v2.0 stays available from its tag. See the README for the full table and the limits.
pip install "nearfield @ git+https://github.com/ground-state-foundry/nearfield"Nearfield v2.0.0
Nearfield v2 is a new model. It separates the caller from other voices instead of deciding band by band who is talking.
- A small recurrent model of our own, trained from scratch. About 628,000 weights, 2.5 MB.
- 16 kHz, 128 ms of delay, about 0.2 s of compute per second of audio on one CPU thread.
- The weights ship inside the Python package.
nearfield-v2.onnxis also attached here. - A light clean-up stage after the model: volume levelling, leftover removal, quieter pauses, softer top end.
Against an equally loud background talker, a speech recogniser lost 13.9% of the caller's words through v2. With no filter it lost 41.4%, and with v1 about 31%. In babble v2 still loses about a third of the caller's words. See the README for the full table, how it was measured, and the limits.
v1 (30 ms of delay, 48 kHz) stays available from the v1.1.0 tag.
pip install "nearfield @ git+https://github.com/ground-state-foundry/nearfield"Nearfield v1.1.0
Adds a fourth strength preset, balanced. Same model file as v1.0.0 (the package still downloads nearfield-v1.onnx from the v1.0.0 release), same 30 ms latency.
strong can delete the caller's words when a background voice is about as loud as the caller, because its whole-frame gate closes mid-sentence. balanced holds the gate open for 1.5 s once the caller is clearly talking, cuts background bands by 12 dB instead of 60 during that hold, and keeps every band above -8 dB. Outside the hold it behaves exactly like strong.
Caller words missing from the transcript, equal-loudness background talker: strong 47.0%, balanced 31.3%, gentle 30.9%, no filter 41.4%. Quieter talker: 20.1% to 12.5%. Babble: 60.6% to 51.2% (still worse than no filter at 38.4%). 40 callers per condition through an 8 kHz phone channel, transcribed with Whisper large-v3-turbo.
The trade: for up to 1.5 s after the caller stops, background speech is turned down rather than removed (non-caller words against an equal talker: 2.6% with strong, 5.4% with balanced).
gentle, strong and full give bit-identical output to v1.0.0. The default stays full; opt in with strength="balanced" (also in NearfieldFilter).
Nearfield v1.0.0
Nearfield v1.0.0: real-time caller voice isolation.
Keeps the voice near the microphone and removes noise and background talkers. One 11 MB ONNX model, 30 ms latency (10 ms frames), 0.5 to 2 ms of CPU per frame on one thread, and it works at 8, 16 or 48 kHz.
nearfield-v1.onnxis attached below (sha2562e57df28c7b2baf788ef6b7340640568999de16084e8eeafd6ff3ef3db3c1ea8). The package downloads and checks it on first use.- Strength settings:
gentle,strong,full(default). On 48 held-out simulated calls,fullcuts background by 41 dB while the caller is silent, at STOI 0.882. - Pipecat filter:
NearfieldFilter, a drop-inaudio_in_filterfor Pipecat transports.
Apache-2.0. Includes DeepFilterNet3 weights by Hendrik Schröter under MIT; see NOTICE.