A command-line tool to normalize the loudness of WAV audio files in a directory (recursively) to a target peak level or integrated LUFS value. Supports mono 16-bit PCM WAV files at 16kHz sample rate.
- Recursive Processing: Scans input directory and subdirectories for
.wavfiles. - Dual Normalization Modes:
- LUFS: Adjusts to target integrated loudness (default: -14 LUFS) using the EBU R128 standard.
- Peak: Adjusts to target sample peak level (default: -1 dBFS).
- Output Mirroring: Preserves the input directory structure in the output folder.
- Efficient: Processes files in-place with minimal memory overhead for typical audio lengths.
- Error-Resilient: Validates file formats and handles errors gracefully with informative messages.
cargo install wav-files-normalize-
Clone the repository:
git clone https://github.com/RustedBytes/wav-files-normalize.git cd wav-files-normalize -
Build and install:
cargo install --path .
Requires Rust 1.75+ (stable channel).
wav-files-normalize [OPTIONS] --input <INPUT> --output <OUTPUT>--input <INPUT>: Input directory containing WAV files (processed recursively).--output <OUTPUT>: Output directory for normalized files.
--target-lufs <TARGET_LUFS>: Target LUFS level (default:-14.0).--target-peak <TARGET_PEAK>: Target peak level in dBFS (default:-1.0).--mode <MODE>: Normalization mode:lufs(default) orpeak.
Run wav-files-normalize --help for full details.
wav-files-normalize --input ./input_audio --output ./normalized_audioThis processes all .wav files in ./input_audio and subfolders, saving results to ./normalized_audio with the same structure.
wav-files-normalize --input ./input_audio --output ./normalized_audio --target-lufs -12.0wav-files-normalize --input ./input_audio --output ./normalized_audio --mode peak --target-peak 0.0Run the test suite:
cargo testIncludes unit tests for scale computation (edge cases like silent files) and integration tests for file I/O.
clap: Command-line argument parsing.ebur128: LUFS loudness analysis.hound: WAV file reading/writing.walkdir: Recursive directory traversal.anyhow: Error handling.
See Cargo.toml for versions.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
- Fork the project.
- Create a feature branch (
git checkout -b feature/AmazingFeature). - Commit changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
@software{Smoliakov_Wav_Files_Toolkit,
author = {Smoliakov, Yehor},
month = oct,
title = {{WAV Files Toolkit: A suite of command-line tools for common WAV audio processing tasks, including conversion from other formats, data augmentation, loudness normalization, spectrogram generation, and validation.}},
url = {https://github.com/RustedBytes/wav-files-toolkit},
version = {0.4.0},
year = {2025}
}