A custom HTDemucs (hybrid spectrogram + waveform transformer Demucs) model trained from scratch to separate synthetic engine/machine sounds into four stems:
| Stem | Content |
|---|---|
whine |
Tonal engine whines: RPM-style frequency ramps (accel/decel, multi-step), steady tones (50/60 Hz mains hum, ~400 Hz bus hum, fan spin-up), beating pairs, rich harmonic stacks with random ratios, inharmonicity and per-harmonic amplitude modulation. Clean and "dirty" variants where the noise is very narrow-band and locked to the harmonic frequencies |
hiss |
Broadband noise floors (white/pink/brown) plus band-limited or progressively drifting hiss whose frequency and level track the whine's fundamental (higher RPM → louder + slight upward drift). Some tracks carry a static room comb-filter coloration. Every track contains broadband content — no purely narrow-band hiss |
click |
Short 5–30 ms transients, random count/timing/spectrum; ~45% of events include subtle echo trains (1–5 ms delays, fast varying decay) |
bump |
Low-frequency damped thuds (25–90 Hz) with softened onsets (no high-frequency spike at the attack) |
Trained on 1,024 synthetic training tracks + 128 validation tracks (44.1 kHz stereo WAVs; L/R are duplicated mono content). Whine/hiss sit ~6 dB below the transients so clicks and bumps dominate their moments in the mixture.
models/demucs4ht.py from ZFTurbo/Music-Source-Separation-Training), 42 M parameterschannels=48, bottom_channels=512, t_layers=5, nfft=4096, CaC (complex-as-channels), no Wiener iterations, sinusoidal time embeddingsmasked_loss, EMA momentum 0.999 (EMA weights are what's shipped), per-stem loudness augmentation ×[0.5, 1.5]Validated on the held-out 128 tracks using the training repo's exact validation code path (demix with overlap-add, no TTA):
| Stem | SDR (dB) | SI-SDR (dB) |
|---|---|---|
| whine | +22.4 | +22.4 |
| hiss | +15.3 | +15.1 |
| click | +5.1 | +3.0 |
| bump | +18.5 | +18.6 |
| ALL | +15.3 | +14.8 |
Notes:
| File | Description |
|---|---|
htdemucs-whine-hiss-click-bump_v1_f16.gguf |
Self-contained audio.cpp GGUF (weights + config embedded), f16 (~84 MB) — recommended |
htdemucs-whine-hiss-click-bump_v1_q8_0.gguf |
Self-contained audio.cpp GGUF (weights + config embedded), q8_0 (~60 MB) |
Works with any audio.cpp build that supports the stock htdemucs family (the C++ pipeline reads the stem list from the embedded config, so custom stems work out of the box). Input must be stereo 44.1 kHz WAV (duplicate mono to L=R first if needed).
audiocpp_cli.exe --task sep --family htdemucs ^
--model htdemucs-whine-hiss-click-bump_v1_f16.gguf --backend cpu ^
--audio input.wav --out-dir stems_out
Outputs: stems_out\whine.wav, hiss.wav, click.wav, bump.wav (same length as the input). The SpectroCraft DAW plugin uses the same GGUF via its HTDemucs node.
pip install torch soundfile librosa # + mss-training requirements
git clone https://github.com/ZFTurbo/Music-Source-Separation-Training mss-training
cd mss-training
python inference.py --model_type htdemucs \
--start_check_point /path/to/htdemucs_engine_state_dict.pt \
--input_folder /path/to/folder_with_mixture.wav \
--store_dir /path/to/output
inference.py expects a raw state dict (not a Lightning checkpoint).
models/demucs4ht.py in ZFTurbo/Music-Source-Separation-Training (training framework used here)MIT — use it however you like, no warranty. The synthetic training data was generated procedurally (no copyrighted material).