noiseextractor
Noise reduction and sound extraction for audio recordings, from Python or the command line:
- Remove background noise (hiss, hum, wind, traffic rumble, room
noise) from a recording:
denoise(). - Remove one particular sound (a barking dog, a cricket, a car, a
cough) or extract it (a bird song, an owl call, a voice) by marking a
small part of it:
mark()andprocess(). - Find the sounds a recording is made of automatically and keep or
drop each:
discover().
It works with soft spectral masks instead of a noise gate: what remains keeps its attack, decay and the loudness ratios of its overtones, so quiet sounds don't vanish and loud ones don't get "pumping" artefacts. Marking part of a sound is enough; the analysis follows its pitch, finds its overtones and resonances, the frequencies that rise and fall with it, its direction in stereo recordings, and every other place in the recording where the same sound occurs.
This is the engine of the noiseextractor
desktop application (Linux, Windows, macOS), where the same filters are
built interactively on a spectrogram. Projects (.nxp) are shared between
the application, this package and the command line tool.
pip install noiseextractor # NumPy support: pip install "noiseextractor[numpy]"
Wheels for Linux (x86_64, aarch64), macOS (Apple silicon, Intel) and
Windows (x64) for every CPython from 3.10 on; no system libraries needed.
Reads WAV, FLAC, Ogg Vorbis, MP3, AAC/M4A and ALAC; writes WAV, FLAC, Ogg
Vorbis, MP3, Opus and ALAC (.m4a).
Remove background noise
import noiseextractor as nx
nx.denoise("field-recording.flac", "clean.flac")
# Stronger, with the noise learned from a noise-only stretch (0.0 .. 1.5 s),
# and the result normalised to -1 dBFS:
nx.denoise("interview.mp3", "clean.mp3", reduction_db=24,
noise_from=(0.0, 1.5), normalize=-1.0)
Remove or extract one sound
Mark a short part of the sound, a rectangle in the spectrogram: when it is and which frequencies it covers. One call of a bird is enough to find the others.
report = nx.mark("garden.flac", time=(12.3, 13.1), freq=(2000, 4500),
name="blackbird", extract=True, save_project="garden.nxp")
print(report) # pitch, overtones, where it occurs again
for o in report.occurrences:
print(f"{o.time_s:.2f} s, match {o.score:.2f}")
# Filter 1 of a new project is the background noise reduction, so the
# marked sound is filter 2.
nx.process("garden.flac", "blackbird-only.wav", project="garden.nxp", solo=[2])
nx.process("garden.flac", "without-blackbird.wav", project="garden.nxp", without=[2])
To suppress a sound (a dog, a cough), mark it without extract=True and
run nx.process("in.flac", "out.flac", project="garden.nxp").
A sound that is not a rectangle in the spectrogram (a U-shaped sweep, a
slanted chirp, a call right next to another one) can be marked by the
corners of a polygon around it instead, as (seconds, Hz) pairs; only
what lies inside counts as marked:
nx.mark("garden.flac", outline=[(1.0, 600), (1.5, 250), (2.0, 600),
(2.0, 700), (1.5, 350), (1.0, 700)],
name="swoop", project="garden.nxp", save_project="garden.nxp")
Find the sounds automatically
for s in nx.discover("night.flac", sounds=6):
print(s) # "suggestion 1 (42 % of the sound): ..."
# Keep suggestion 2 and extract it:
nx.discover("night.flac", sounds=6, enable=[2], extract=True,
save_project="night.nxp")
nx.process("night.flac", "owl.wav", project="night.nxp")
Samples in memory
The *_array functions take and return float samples in -1..1: a NumPy
array of shape (frames,) or (channels, frames), or plain sequences
(then array.array("f") comes back).
samples, rate = nx.load("in.wav") # (channels, frames) float32
clean = nx.denoise_array(samples, rate)
birds = nx.process_array(samples, rate, project="garden.nxp", solo=[2])
Spectrogram
nx.spectrogram("garden.flac", "garden.png", project="garden.nxp", log=True)
Blue is what remains, green what a filter's marked part covers, red what the analysis found to belong to it, orange both.
Command line
The package installs noiseextractor-cli (also python -m noiseextractor):
noiseextractor-cli denoise in.flac -o clean.flac
noiseextractor-cli mark in.flac --time 12.3:13.1 --freq 2000:4500 \
--name blackbird --extract --save-project birds.nxp
noiseextractor-cli process in.flac --project birds.nxp --solo 2 -o birds.wav
noiseextractor-cli discover in.flac --sounds 6
noiseextractor-cli --help
API
| Function | What |
|---|---|
denoise(input, output, *, reduction_db=18, rule="lsa", noise_from=None, normalize=None, format=None, bitrate=None, save_project=None) |
Background noise reduction. |
mark(input, *, time, freq, name, extract=False, project=None, save_project=None) |
Mark part of a sound; returns a MarkReport and adds a filter to the project. Instead of time and freq, outline=[(seconds, Hz), ...] marks a free-form region. |
discover(input, *, sounds=6, time=None, grouping=True, enable=None, extract=False, project=None, save_project=None) |
Suggest a filter per sound found; returns Suggestions. |
process(input, output, *, project=None, solo=None, without=None, normalize=None, format=None, bitrate=None) |
Apply a project; solo/without keep or drop filters' sounds (numbered from 1). |
denoise_array(samples, rate, ...), process_array(samples, rate, ...) |
The same on samples in memory. |
load(path) |
Decode a file into (samples, sample_rate). |
spectrogram(input, output, *, project=None, width=1200, height=400, max_hz=None, log=False) |
PNG of the processed spectrogram. |
new_project(path) |
A project with background noise reduction only. |
Times are seconds, frequencies Hz. File errors raise noiseextractor.Error,
bad arguments ValueError. Every function releases the interpreter lock
while it works and takes threads= (default: one per CPU core).
License
LGPL-3.0-or-later: you may use the package from programs under any license, open or closed; changes to noiseextractor itself must be shared under the same license. (The desktop application is GPL-3.0-or-later.) Source, issues and the desktop application: https://github.com/gunterkoenigsmann/noiseextractor.
Metadata
Release files for noiseextractor 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| noiseextractor-0.2.0.tar.gz | 4.9 MB | With provenance | Details for noiseextractor-0.2.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| noiseextractor-0.2.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for noiseextractor-0.2.0-cp310-abi3-win_amd64.whl |
| noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details for noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl |
| noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ ARM64 | Details for noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl |
| noiseextractor-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl | CPython 3.10 | abi3 | macOS 11.0+ x86-64 | Details for noiseextractor-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl |
| noiseextractor-0.2.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for noiseextractor-0.2.0-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 19.5 MB
Release files / noiseextractor-0.2.0.tar.gz
| Download URL | noiseextractor-0.2.0.tar.gz |
|---|---|
| Size | 4.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6af82de21eb876a44f9f2cb8ddb5791a5b494bffabf899f1d3b30dd1b1d94cd9
|
|
BLAKE2b-256 checksum How to use checksums |
c347153d7f8eea00cdf0686941553644fd54a7fd4320071853f19211f3f980f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / noiseextractor-0.2.0-cp310-abi3-win_amd64.whl
| Download URL | noiseextractor-0.2.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e894cf7685f68dd29624202d28ee5cddeb0bc3fa16d08ed32e8c69c2baeb3747
|
|
BLAKE2b-256 checksum How to use checksums |
b2c43a731a2b99748dfd807edc043ece21f571254f63eba9ff751c727cdd1348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
edc961970f1f0fe0732b69e4431581865ee26f014fefa57f44c3a0b71ff4ace8
|
|
BLAKE2b-256 checksum How to use checksums |
ad1d3c8a73b2bd9104218aa3385a30dbb4d6b62d5f1446846da4dc0ca9642fd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | noiseextractor-0.2.0-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
9d1b6e58cdb0cbc31bd1912164779028c458aa5368cd8ff51e6ff09d7af1e143
|
|
BLAKE2b-256 checksum How to use checksums |
089cb308775714ab2d0e64a87703164a2b3b3c1a662c42a58a764368e2c4b73e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / noiseextractor-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl
| Download URL | noiseextractor-0.2.0-cp310-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
326ce158ce5857c65871a1190fdbf9fb4653c14169f9890ec9e8ecd70279bdb4
|
|
BLAKE2b-256 checksum How to use checksums |
1ce037c918c2b49ed5207191852b93100927dd18cb1cdd0564ddf76b901e3349
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / noiseextractor-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | noiseextractor-0.2.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0e71f92b653cc51c81afc915824e8e3cfb134d472a1d8eba73a32f593800ce41
|
|
BLAKE2b-256 checksum How to use checksums |
f14a72283762ffdccb999eb231e854c0b919b98994c662d55ade05222d33e8ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for noiseextractor 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for noiseextractor-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.