[KongchangAI]
· 2 min read· 1,082 words

WaveWash: An Audio Data Cleaning and Deduplication Tool for Pre-ML Training

WaveWash: An Audio Data Cleaning and Deduplication Tool for Pre-ML Training

WaveWash is an open-source tool that automates audio quality control and data preparation, solving data pain points in speech model training.

WaveWash is an open-source audio quality control and data preparation tool for speech model training such as Whisper, TTS, and voice cloning. It non-destructively repairs clipping and DC offset, normalizes loudness, detects duplicates, and sorts files into clean, error, and duplicate directories. It offers four presets, audit logs, and a zero-config local Web UI in the Python package.

When training speech models (Whisper, TTS, voice cloning), data quality issues often become the biggest stumbling block—clipping, DC offset, background noise, low signal-to-noise ratio, and duplicate samples that quietly inflate validation metrics. Developers either write one-off scripts or manually listen through thousands of audio files, which is extremely inefficient.

The open-source tool WaveWash was born precisely to solve this pain point: it automates audio quality control and data preparation, so developers no longer have to reinvent the wheel.

WaveWash project screenshot

What WaveWash Can Do

WaveWash's core philosophy is "non-destructive preprocessing": all processing is done on copies, and the original files are never modified. After processing, audio is automatically sorted into different directories for easy access during subsequent training.

Specific features include:

  • Four tuning presets: Built-in configuration profiles for four scenarios—ASR (Whisper), TTS, speaker recognition, and music generation—so you don't need to manually tune parameters.
  • Safe automatic repair: Corrects DC offset, repairs mild clipping, and normalizes loudness according to the EBU R128 standard.
  • Smart sorting: Audio that passes goes into the clean/ directory; rejected files are categorized by reason into _error/ (such as low_snr/, clipping/); duplicate samples (exact duplicates and near-duplicates) are placed separately into _duplicates/, and no files are deleted.
  • Complete audit logs: Summaries in CSV, JSON, and Markdown formats make it easy to trace the processing result of every file.

DC Offset and Clipping

DC offset refers to the centerline of the audio waveform deviating from zero level, often caused by unstable power supply in recording equipment or ADC bias. It makes the waveform asymmetric, affects the accuracy of feature extraction such as MFCC, and can even introduce low-frequency hum. Mild clipping, on the other hand, occurs when the signal exceeds the sampling ceiling and is "flattened," producing harmonic distortion and a harsh sound. Both types of problems degrade data quality when training speech models. WaveWash's "safe automatic repair" performs mean removal for DC offset and interpolation or soft limiting for mild clipping, and only operates on copies to avoid further damage to the original material.

Signal-to-Noise Ratio (SNR) and Low-SNR Samples

Signal-to-noise ratio is the ratio of signal power to noise power, usually expressed in decibels (dB). In speech data, low SNR means background noise (such as fans or keyboard sounds) may overpower the speech, making it easy for the model to learn noise characteristics rather than language patterns, which degrades recognition or synthesis quality. In the industry, samples with SNR below 10–15 dB are generally considered to require careful use. WaveWash estimates SNR and places files below the threshold into _error/low_snr/, allowing developers to quickly filter them out or handle them separately rather than letting them quietly pollute the training set.

Zero-Config Local Web UI

One of WaveWash's highlights is "zero config"—the Web UI is packaged directly inside the Python package, with no additional Node.js build step required.

Installation and startup require just two commands:

pip install wavewash
wavewash app

The browser automatically opens http://127.0.0.1:8420, and you can complete all operations in the graphical interface. If you prefer the command line, you can also run directly:

wavewash run --input ./raw_audio --output ./clean_audio --purpose asr

This design is quite friendly to Python developers who don't want to fiddle with a frontend build environment, lowering the barrier to using audio data cleaning tools.

Why Audio Data Cleaning Deserves Its Own Tool

Data issues in speech model training are often underestimated. Clipping introduces harmonic distortion, DC offset affects feature extraction, low-SNR samples make the model learn noise rather than speech, and duplicate samples cause validation set leakage, inflating evaluation metrics.

The traditional approach is to write one-off scripts, but the inspection rules, repair strategies, and directory structures must be rewritten for every project. WaveWash consolidates these common logic patterns into reusable presets and pipelines, while preserving non-destructiveness and audit logs, in line with the "reproducible and traceable" practices required in ML engineering.

The project is currently in an early alpha stage (v0.1.0a1), and the author explicitly welcomes feedback, issues, and feature suggestions.

EBU R128 and Loudness Normalization

EBU R128 is an audio loudness standard published by the European Broadcasting Union. It measures loudness as perceived by the human ear using LUFS (Loudness Units Full Scale), rather than simply peak level. Traditional normalization only looks at peaks, which can easily lead to huge perceived volume differences between different audio files; R128 calculates overall loudness through the K-weighting filter algorithm of ITU-R BS.1770 and provides a True Peak limit. For speech models, a consistent loudness distribution can reduce the model's sensitivity to volume changes and make training more stable. WaveWash uses this standard for normalization, meaning the processed audio is more consistent both perceptually and numerically, suitable for being fed directly into Whisper or TTS training pipelines.

Duplicate Samples and Validation Set Leakage

In speech datasets, it is common for the same sentence to be recorded multiple times, or for the same audio file to be included repeatedly under different naming conventions. If exact duplicates or near-duplicate samples appear in both the training set and the validation set, the model will have "seen" these samples during validation, causing inflated metrics that cannot reflect true generalization ability—this is validation set leakage. Detecting near-duplicates usually relies on audio fingerprints or similarity calculations of embedding vectors, which is more complex than exact hashing. WaveWash sorts duplicate samples separately into _duplicates/ without deleting them, which both avoids leakage risk and preserves the possibility of manual review, in line with best practices for data auditing.

One-line Summary

WaveWash is an open-source tool that automates audio quality control and data preparation, solving data pain points in speech model training.

Paragraph Summary

WaveWash is an open-source audio quality control and data preparation tool designed to solve common clipping, DC offset, background noise, low signal-to-noise ratio, and duplicate sample issues in speech model training such as Whisper, TTS, and voice cloning. It uses non-destructive preprocessing, never modifying original files, and through safe automatic repair, smart sorting, and complete audit logs, stores qualified audio, rejected files, and duplicate samples separately. It includes four tuning presets for ASR, TTS, speaker recognition, and music generation, with no manual parameter tuning required. The zero-config local Web UI is packaged directly in the Python package with no Node.js build, and can be used after installation with just two commands. It is currently in the early alpha stage v0.1.0a1, and the author welcomes community feedback.

#WaveWash#audio data cleaning#deduplication#ML training#DC offset correction#loudness normalization#ASR#TTS
Share:

Related articles