Expand description
denoize — pure-Rust audio denoiser built for the world’s highest fidelity.
Goal: transparent, artifact-free restoration that preserves timbre, transients, dynamics, and “air” better than any classical offline tool.
§Implemented technologies
§Classical DSP (always available)
- STFT/ISTFT + Perfect Reconstruction OLA(高オーバーラップ対応)
- IMCRA/MCRA ノイズ推定 + Spectral Flatness プロファイル + Anchoring
- Ephraim-Malah Decision-Directed SNR
- 8種類のゲイン推定器(OMLSA, LogMMSE, MMSE-STSA, Wiener, SpecSub + 非線形/幾何学的)
- Attack/Release + Cepstral Smoothing + Transient Protection
- 高度窓関数: Kaiser / Flat-top / DPSS
- マルチバンドスペクトルサブトラクション
- 知覚重み付け(Bark帯域)+ 音楽ノイズ抑制ポストフィルタ
§Input / output codecs (built-in, no ffmpeg)
- Decode: WAV / MP3 (
symphonia, including Xing/LAME gapless timing, with a bounded raw-stream compatibility fallback) / M4A (Pure-Rust AAC-LC and ALAC with v0/v1 unity-rate edit-list presentation timing) - Encode: WAV / MP3 (
shine-rs) / M4A (oxideav-aacPure-Rust AAC-LC) - Decoded to
f64PCM at native sample rate (no extra quantisation)
§Optional AI backends (feature-gated)
rnnoisefeature: RNNoise via nnnoiseless (pure-Rust)deepfilterfeature: DeepFilterNet v3 via tract ONNXonnxfeature: user-supplied waveform ONNX models via tract (including a reusable, contract-checked loaded-model API)mpsenetfeature: MP-SENet compressed-magnitude/phase ONNX adapterbsrnnfeature: ESPnet BSRNN spectral ONNX adaptermossformer2feature: ClearerVoice MossFormer2 48 kHz ONNX adaptersgmsefeature: SGMSE+ iterative diffusion ONNX adapter
Build with all backends: cargo build --release --features full
Re-exports§
pub use atomic_output::AtomicOutput;pub use atomic_output::CommitMode;pub use audio::ensure_memory_limit;pub use audio::estimate_audio_memory_bytes;pub use audio::estimate_audio_working_set_bytes;pub use audio::estimate_file_memory_bytes;pub use audio::estimate_session_memory_bytes;pub use audio::estimate_stream_memory_bytes;pub use audio::estimate_stream_memory_bytes_checked;pub use audio::inspect_wav_session;pub use audio::read_audio;pub use audio::read_audio_from_session;pub use audio::read_audio_from_session_with_limits;pub use audio::read_audio_with_limits;pub use audio::read_audio_with_metadata_limits;pub use audio::read_wav;pub use audio::read_wav_bytes;pub use audio::read_wav_bytes_with_limits;pub use audio::read_wav_from_session;pub use audio::read_wav_from_session_with_limits;pub use audio::read_wav_with_limits;pub use audio::sanitize_sample;pub use audio::write_audio;pub use audio::write_wav;pub use audio::write_wav_bytes;pub use audio::write_wav_channel_mask;pub use audio::Audio;pub use audio::WavStreamInfo;pub use audio::WavStreamReader;pub use audio::WavStreamWriter;pub use backend::gtcrn::GtcrnModel;pub use backend::gtcrn::GtcrnStream;pub use backend::onnx::OnnxWaveformContract;pub use backend::onnx::OnnxWaveformLayout;pub use backend::onnx::OnnxWaveformModel;pub use backend::decode_mid_side;pub use backend::encode_mid_side;pub use backend::Backend;pub use backend::BackendOptions;pub use backend::BackendSession;pub use backend::ChannelMode;pub use backend::OnnxModelConfig;pub use backend::SgmseProfile;pub use backend::StreamingBackendSession;pub use benchmark::ArtifactReport;pub use benchmark::BenchmarkReport;pub use benchmark::ComparisonReport;pub use channel_layout::ChannelLayout;pub use channel_layout::ChannelMask;pub use channel_layout::ChannelPosition;pub use channel_layout::PanInfo;pub use config::ConfigError;pub use config::ResourcePlan;pub use decode::decode_file;pub use decode::decode_file_from_session_with_limits;pub use decode::decode_file_with_limits;pub use decode::decode_file_with_metadata_limits;pub use decode::probe_file;pub use decode::probe_file_from_session_with_limits;pub use decode::probe_file_with_limits;pub use decode::probe_file_with_metadata_limits;pub use decode::AudioCodec;pub use decode::AudioFormat;pub use decode::AudioProbe;pub use decode::DecodeLimits;pub use decode::DecodedPcm;pub use denoiser::Denoiser;pub use denoiser::DenoiserConfig;pub use denoiser::Preset;pub use denoiser::ProcessingMode;pub use denoiser::StreamingDenoiser;pub use encode::AacEncoder;pub use encode::DownmixMode;pub use encode::EncodeOptions;pub use encode::OutputFormat;pub use gain::Algorithm;pub use gain::SpecSubLaw;pub use input::AudioInputSession;pub use quality::QualityMetrics;pub use window::WindowParams;pub use window::WindowType;
Modules§
- atomic_
output - Atomic creation and replacement of filesystem outputs.
- audio
- Audio file I/O: WAV read/write (
hound) + unified decode for MP3/M4A/WAV. - backend
- Optional AI denoising backends (feature-gated).
- benchmark
- Objective quality and stereo-imaging reports.
- bessel
- Special functions needed by the Ephraim-Malah family of gain estimators: modified Bessel functions of the first kind, orders 0 and 1, and the exponential integral E1.
- channel_
layout - Standard channel layouts used by the audio pipeline.
- config
- Shared validation and resource-planning primitives for external input.
- decode
- denoize 自作デコード層 — lossless / lossy audio containers を高品質 PCM (
f64) へ。 - denoiser
- The de-noizer: ties together STFT, IMCRA noise estimation, the decision-directed a-priori SNR estimator, the selected spectral gain estimator, attack/release + cepstral gain smoothing, transient protection, and optional pre-emphasis.
- encode
- Audio encode layer — WAV / MP3 / M4A output.
- fft
- A self-contained, allocation-light, iterative radix-2 Cooley-Tukey FFT.
- gain
- Spectral gain estimators.
- input
- Stable, regular-file-backed audio input sessions.
- loudness
- EBU R128 / ITU-R BS.1770 loudness measurement and normalization.
- metadata
- Cross-container audio metadata preservation.
- models
- Signed external-model catalog, verified local cache, and installation provenance.
- noise
- Noise-power-spectral-density estimation.
- perceptual
- Perceptual weighting for spectral gain control.
- postfilter
- Musical-noise suppression post-filter.
- quality
- Full-reference perceptual quality metrics.
- resample
- Band-limited, channel-synchronous sample-rate conversion.
- service
- Shared application service used by the CLI and graphical frontends.
- stft
- Short-time Fourier transform engine with perfect-reconstruction overlap-add (OLA) synthesis.
- stream
- Stateful block-processing API for realtime and pipe integrations.
- vad
- Lightweight energy VAD and speech-region segmentation.
- window
- Window functions for short-time Fourier analysis/synthesis.
Functions§
- denoise_
audio_ with_ backend_ config - Process already-decoded audio in place. This is the path used by stdin and embedders that do not have filesystem-backed input.
- denoise_
audio_ with_ backend_ session - Process decoded audio with a prepared backend graph.
- denoise_
file - Denoise a WAV file end-to-end, writing the result to
output. - denoise_
file_ with_ backend - Denoise with an explicit backend (classical / rnnoise / deepfilter).
- denoise_
file_ with_ backend_ config - Denoise with explicit backend, encoder, and backend-specific model options.
- denoise_
file_ with_ backend_ opts - Denoise with explicit backend and output encode options.
- write_
audio_ transactional - Encode audio and optional metadata into a staged file, then publish it in one filesystem commit.
- write_
audio_ transactional_ as - Encode audio using a format selected during preflight, then publish it in one filesystem commit without re-inferring the codec from the path.