A custom HTDemucs (hybrid spectrogram + waveform transformer Demucs) model trained from scratch to separate synthetic engine/machine sounds into two 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 |
Trained on 1,024 synthetic training tracks + 128 validation tracks (44.1 kHz stereo WAVs; L/R are duplicated mono content). This is the two-stem variant of a four-stem engine dataset: the whine/hiss stems are reused verbatim and each mixture is exactly whine + hiss, so the model only ever has to decide "tonal vs. noise".
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 embeddingssources=['whine', 'hiss'])masked_loss, EMA momentum 0.999 (EMA weights are what's shipped), per-stem loudness augmentation ×[0.5, 1.5]Training-time validation (the repo's exact validation code path, plain non-scale-invariant SDR averaged over both stems): best epoch reached +21.3 dB — well above the four-stem model (+15.3 dB), as expected for a two-class tonal/noise task. Per-stem breakdowns are not included in this card; run eval_valid.py (or the repo's validation) on your own data if you need them.
On a real 78 s engine-start recording, the two stems together explain ~98% of the input energy, and both agree closely with the four-stem model's outputs for these stems (waveform correlation ≈ 0.96–0.97).
| File | Description |
|---|---|
htdemucs-whine-hiss_v1_f16.gguf |
Self-contained audio.cpp GGUF (weights + config embedded), f16 (~80 MB) — recommended |
htdemucs-whine-hiss_v1_q8_0.gguf |
Same model, q8_0 quantized (~94 MB; for this architecture f16 is actually smaller) |
htdemucs-whine-hiss_v1_state_dict.pt |
Raw PyTorch state dict (native tensor names, fp32, ~160 MB) for use with the mss-training repo's inference.py |
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 and non-standard stem counts 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_v1_f16.gguf --backend cpu ^
--audio input.wav --out-dir stems_out
Outputs: stems_out\whine.wav and hiss.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-whine-hiss_v1_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).
Included for reference: engine_start_stereo.wav — a 78 s real engine-start recording (44.1 kHz stereo) — and its two separated stems in sample_sep/ (whine.wav, hiss.wav). The whine stem shows the characteristic start-up ramp: quiet for the first ~35 s, then rising to full level around 40–48 s.
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).