Process audio to find voices in it. Used to process V2k recordings and find the audio within it.
You can quickly run the spectral denoising pipeline over one or more audio files (or folders full of files) without writing code:
python -m audio.pipeline path/to/input.wav another_dir/ \
--output-dir denoised_outputs \
--preset aggressive \
--multiband-gate --wiener- Accepts individual files and directories (searched recursively with
--glob, default*.wav). - Preserves relative paths inside the output directory and appends a
_denoised_<preset>.wavsuffix. - Supports the same optional stages as the library API: multi-band gating, Wiener filtering, and spectral subtraction.
The underlying functions are available from Python if you want to script your own evaluation against a set of test clips:
frompathlibimportPathfromaudioimportprocess_batchoutputs=process_batch([Path("tests/inputs")], Path("tests/outputs"), preset="conservative")
foroutinoutputs:
print(out)
## OverviewTheprocessingpipelineloadsaninputfile, optionallyappliesamanualgainboost, runsaplaceholderdenoiser, andcanthennormalizeloudnessand/oraddaband-passfilterbeforesavingtheresult. Loadingprefers`soundfile`andfallsbackto`ffmpeg`foruncommoncodecs. Audioisresampledtoafixedsamplerate (default16kHz) andconvertedtomonoforconsistentdownstreamprocessing.
## Command line interfaceRuntheCLIwith:python -m src.cli INPUT OUTPUT [--target-sr 16000] [--gain-db 3.0] [--normalize] [--bandpass]
Available options are also listed in `--help` output:
* `--target-sr` – resample input to this rate (defaults to 16 kHz).
* `--gain-db` – apply a manual preamp (in decibels) before denoising.
* `--normalize` – normalize loudness to the EBU R128 target (-23 LUFS).
* `--bandpass` – apply an 80 Hz–8 kHz Butterworth band-pass filter.
Example:
python -m src.cli noisy.wav cleaned.wav --gain-db 6 --normalize --bandpass