Basics · audio-classification · WASM q8 · ~24 MB

10-Genre Probability, Waveform & Sliding-Window Timeline Inspector

Look inside DistilHuBERT's raw-waveform genre decision: audition the two bundled WAV clips, play deterministic 16 kHz synthesized loops, or drop your own track — then inspect its acoustic descriptors, full 10-genre softmax, entropy & top-1/top-2 margin, and slice-by-slice temporal confidence timeline. Everything executes locally in a Web Worker.

1. On-device model

2. Audition a clip & configure sliding windows

Bundled WAVs are decoded to 16 kHz mono; synthesized tracks are generated deterministically in pure JavaScript Float32Array (zero extra downloads). Upload any song to see how the classifier tracks intros, verses, and choruses over time.

Select a sample or upload an audio clip once the model is ready.

Duration–
RMS level–
Peak / Crest–
Spectral centroid–
Zero-crossings–
Low / Mid / High–

3. Whole-clip 10-genre distribution & uncertainty

Predicted genre distribution

Softmax confidence diagnostics

Run a clip to inspect entropy, top-1/top-2 margin, and latency.

Top-1 score–
Runner-up–
Top-1 / Top-2 margin–
Entropy (max 3.32)–
Confidence tier–
Backend / Latency–

4. Sliding-window temporal genre timeline

Each window is sliced at 16 kHz mono and classified independently in FIFO order to reveal whether the model stays locked on one genre or shifts across sections.

Window Time span Top-1 genre Confidence Runner-up Entropy Latency
No windows analysed yet.

5. GTZAN 10-genre taxonomy & acoustic cues

DistilHuBERT reads raw 16 kHz waveforms directly without metadata or lyrics. These ten fixed classes are inherited from the GTZAN benchmark fine-tune.

6. Show the code

Inspect the exact worker lifecycle, real audio-classification pipeline call, entropy/margin math, and sliding-window slicer powering this page.

Show the code — coalesced ONNX pipeline loader (worker.js)
Show the code — real 10-genre audio-classification call (worker.js)
Show the code — softmax entropy & top-1/top-2 margin (genre-core.mjs)
Show the code — sliding-window audio slicer (genre-core.mjs)