Expand description
Audio restoration toolbox — denoise, de-hum, de-click, de-clip, normalise.
Default denoising uses spectral subtraction (pure Rust, zero weights).
Enable the ml feature for candle-based neural denoising (Demucs, DNS Challenge).
§Quick start
use cathar::{Denoiser, SpectralDenoiser, generate_wave};
let audio = generate_wave(44100, 440.0, 1.0, 0.2);
let denoiser = SpectralDenoiser::default();
let clean = denoiser.denoise(&audio)?;
assert_eq!(clean.channels[0].len(), audio.channels[0].len());Structs§
- Audio
Data - Noise
Print - Pre-computed noise profile from a silence segment.
Feed into
SpectralDenoiser::with_noise_printinstead of auto-detection. - Spectral
Denoiser
Enums§
Traits§
Functions§
- bandwidth_
extend - Restore high-frequency content lost to compression or low sample rates.
- breath_
remove - Detect and attenuate breath sounds between speech segments.
- declick
- Detect and interpolate impulse clicks.
- declip
- Detect and reconstruct clipped samples.
- deesser
- Reduce sibilance (harsh “s”, “sh”, “ch” sounds) using HF compression.
- dehum
- Remove mains hum (50/60 Hz + harmonics) using cascaded notch filters.
- dereverb
- Remove room reverb using spectral envelope decay gating.
- generate_
wave - learn_
noise_ print - Learn a noise profile from an audio segment (should be silence/noise-only).
- normalize_
loudness - Scale to target integrated loudness (EBU R128 approximation via RMS). Target in LUFS: -23 = broadcast, -16 = podcast, -14 = streaming.
- normalize_
peak - Scale to target peak level in dBFS (0 dBFS = ±1.0, -3 dBFS = ~±0.707).
- variance
- voice_
isolate - Isolate speech from background using energy-based VAD + spectral gating.
- wiener_
denoise - Wiener-filter denoiser — statistically optimal, better transients.