Lattice audio models
ONNX exports of audio analysis models used by Lattice, downloaded by the app on first use.
beat-this-final0.onnx
Beat This (Foscarin, Schlüter and Widmer, Beat this! Accurate beat tracking without
DBN postprocessing, ISMIR 2024; Institute of Computational Perception, JKU Linz), the final0 checkpoint, exported
unchanged to ONNX (opset 17, fp32). MIT licence, as the original.
- Input
spect: float32[1, T, 128], a log-mel spectrogram of mono 22.05 kHz audio: STFT 1024 with a periodic Hann window, hop 441 (50 frames per second), centred with reflect padding, magnitude scaled by 1/sqrt(1024), 128 slaney mel bands from 30 Hz to 11 kHz without filter normalisation, thenlog(1 + 1000 * x). - Outputs
beatanddownbeat: float32[1, T]logits per frame. - T is free; the model was trained on 1500-frame (30 s) excerpts. Longer pieces run in 1500-frame chunks overlapping by 6 frames at each edge, then peaks are picked (maximum within ±3 frames, logit above 0), as in the reference code.
Exported with Lattice's scripts/audio-models/export_beat_this.py; outputs match PyTorch within 1e-5.
Citation (Beat This)
@inproceedings{foscarin2024beatthis,
author = {Francesco Foscarin and Jan Schl{\"u}ter and Gerhard Widmer},
title = {Beat this! Accurate beat tracking without DBN postprocessing},
booktitle = {Proceedings of the 25th International Society for Music Information Retrieval Conference (ISMIR)},
year = 2024
}
htdemucs.onnx
Hybrid Transformer Demucs (Rouard, Massa and Défossez, Hybrid Transformers
for Music Source Separation, ICASSP 2023; Meta AI), the pretrained htdemucs model, exported to ONNX (opset 17, fp32)
without its STFT and inverse STFT, which ONNX cannot express with complex numbers. MIT licence, as the original.
- Inputs:
mixfloat32[1, 2, 343980], one 7.8 s stereo segment at 44.1 kHz (the song normalised by its mono mix's mean and standard deviation, asdemucs.separatedoes);specfloat32[1, 4, 2048, 336], the segment's spectrogram asHTDemucs._specand_magnitudemake it (STFT 4096, hop 1024, periodic Hann, normalised, the last bin dropped; real and imaginary parts of each channel as channels). - Outputs:
spec_stemsfloat32[1, 4, 4, 2048, 336], the frequency branch's stems as spectrograms in the same layout;wave_stemsfloat32[1, 4, 2, 343980], the time branch's stems. A stem is the inverse STFT of the first (HTDemucs._ispec) plus the second. Stems in order: drums, bass, other, vocals. - Songs are split into segments overlapping by a quarter and blended with triangular weights, as
demucs.apply.apply_modeldoes.
Exported with Lattice's scripts/audio-models/export_htdemucs.py; outputs match PyTorch within 2e-4. A whole song
separated with it matches apply_model (shifts 0) at 45 to 53 dB SDR per stem.
Citation (Demucs)
@inproceedings{rouard2022hybrid,
title = {Hybrid Transformers for Music Source Separation},
author = {Rouard, Simon and Massa, Francisco and D{\'e}fossez, Alexandre},
booktitle = {ICASSP 23},
year = {2023}
}