use case · multi-model · Basic Pitch (0.3 MB) × DistilHuBERT Genre (24 MB)
Run two distinct audio neural networks on the exact same clip in two separate Web Workers — completely offline after first download. Stage 1 (Basic Pitch, ~0.3 MB, ONNX Runtime Web) listens at 22.05 kHz to extract polyphonic MIDI notes, musical key, chord progression, and pitch range. Stage 2 (DistilHuBERT Music Genre, ~24 MB, Transformers.js) listens at 16 kHz to tag the musical genre across the 10 GTZAN classes.
spotify/basic-pitch · onnxruntime-web · fp32 · ~0.3 MB
onnx-community/Musical-genres-Classification-Hubert-V1-ONNX · transformers.js · q8 · ~24 MB
Presets are synthesized live in JS and resampled cleanly to 22.05 kHz (Stage 1) and 16 kHz (Stage 2). Upload a real song clip for the full 10-genre GTZAN range.
Load both Stage 1 and Stage 2 models above to run the full two-stage pipeline.
DistilHuBERT probabilities over the exact same audio clip (resampled to 16 kHz mono):