Skip to main content

Noise Suppression Net 2 (NSNet2) baseline inference script

  • As a baseline for ICASSP 2021 Deep Noise Suppression challenge, we will use the recently developed SE method based on Recurrent Neural Network (RNN). For ease of reference, we will call this method as Noise Suppression Net 2 (NSNet 2). More details about this method can be found in here.

Installation

pip install nsnet2-denoiser

Usage:

From the NSNet2-baseline directory, run run_nsnet2.py with the following required arguments:

  • -i "Specify the path to noisy speech files that you want to enhance"
  • -o "Specify the path to a directory where you want to store the enhanced clips"
  • -fs "Sampling rate of the input audio. (48000/16000)"

python -m nsnet2_denoiser.denoise -i audio/

Use default values for the rest. Run to enhance the clips.

Python

from nsnet2_denoiser import NSnet2Enhancer
enhancer = NSnet2Enhancer(fs=48000)

# numpy
import soundfile as sf
sigIn, fs = sf.read("audio.wav")
outSig = enhancer(sigIn, fs)

# pcm_16le
from pydub import AudioSegment
audioIn = AudioSegment.from_wav("audio.wav")
audioOut = enhancer.pcm_16le(audioIn.raw_data)

Attribution:

Pretrained model NSNet2 by Microsoft is licensed under CC BY 4.0

Citation:

The baseline NSNet noise suppression:

@misc{braun2020data,
    title={Data augmentation and loss normalization for deep noise suppression},
    author={Sebastian Braun and Ivan Tashev},
    year={2020},
    eprint={2008.06412},
    archivePrefix={arXiv},
    primaryClass={eess.AS}
}

Metadata

Release files for nsnet2-denoiser 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nsnet2-denoiser 0.2.3
File Size Uploaded
nsnet2-denoiser-0.2.3.tar.gz 33.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nsnet2-denoiser 0.2.3
File Interpreter ABI Platform
nsnet2_denoiser-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 66.0 MB

Release files / nsnet2-denoiser-0.2.3.tar.gz

Download URL nsnet2-denoiser-0.2.3.tar.gz
Size 33.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6d8d44096bf4ae3e22c6b829ba6906849c2a8bd41dec290f5166e49d530fdd68
BLAKE2b-256 checksum
How to use checksums
ffcd10bb42d89c89bce633b54d728fb4a56a610564aafb0567a3cba241a580ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / nsnet2_denoiser-0.2.3-py3-none-any.whl

Download URL nsnet2_denoiser-0.2.3-py3-none-any.whl
Size 33.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0d9d131f25674bf9f6d9d8eb745d4c32df0c9b9f2bac509694ef1020fa6ec093
BLAKE2b-256 checksum
How to use checksums
ed5aebd97f295d10fa9b0c806ba68b66ca8326dfe2029f410ca2adad86838d4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page