Table of Contents

Class NoiseSuppressionEffect

Namespace
NAudio.Effects
Assembly
NAudio.Core.dll

Single-channel-independent spectral noise suppressor (STFT Wiener / spectral subtraction). A square-root-Hann weighted overlap-add analysis estimates the noise spectrum during non-speech frames (gated by a shared VoiceActivityDetector) and applies a smoothed per-bin attenuation to reduce stationary background noise. This is the build-from-scratch "tier-a" suppressor; an ML tier (RNNoise) remains a future evaluation. Reports its frame size as latency.

public sealed class NoiseSuppressionEffect : AudioEffect, IAudioEffect, IParameterized
Inheritance
NoiseSuppressionEffect
Implements
Inherited Members

Properties

Aggressiveness

Over-subtraction factor; higher removes more noise (and risks artefacts). Default 1.5.

public float Aggressiveness { get; set; }

Property Value

float

FrameSize

STFT frame size; a power of two (256–2048). Default 512.

public int FrameSize { get; set; }

Property Value

int

LatencySamples

Processing latency the effect introduces, in samples per channel. Zero for effects with no inherent delay; non-zero for look-ahead or block/partitioned designs that need delay compensation in a chain.

public override int LatencySamples { get; }

Property Value

int

NoiseAdaptation

Noise-estimate adaptation rate per non-speech frame, 0–1. Default 0.05.

public float NoiseAdaptation { get; set; }

Property Value

float

Parameters

Generic parameter list (excludes Bypass/Mix, which are on the base).

public IReadOnlyList<EffectParameter> Parameters { get; }

Property Value

IReadOnlyList<EffectParameter>

SpectralFloor

Minimum per-bin gain (linear), the residual noise floor. Default 0.08.

public float SpectralFloor { get; set; }

Property Value

float

Methods

OnConfigure(WaveFormat)

Called by Configure(WaveFormat) after the format is stored. Derived effects allocate and size their sample-rate-dependent state here.

protected override void OnConfigure(WaveFormat format)

Parameters

format WaveFormat

ProcessBlock(Span<float>)

Transforms buffer in place into the fully-wet signal. The base class handles dry/wet mixing and bypass around this call.

protected override void ProcessBlock(Span<float> buffer)

Parameters

buffer Span<float>

Reset()

Clears internal state (delay lines, envelopes, smoothers) so the next block starts as if from silence.

public override void Reset()