Auto-split test (2,401 clips drawn from the same distribution as training, per-song majority-voted)
94.46%
Source-quality adversarial test (2,043 clips from 150 SBD/AUD/MTX-tagged Internet Archive shows the model has never seen)
93.93%
The 0.5-pp drop on the adversarial test set is small — the model generalizes well. It doesn't rely on crowd-noise shortcuts: soundboard-mixed live recordings (no audible crowd) still score 93.1%.
Quick start
Python (recommended)
python
1# Install2pip install librosa torch transformers huggingface_hub
34# Download the model files and predict5from huggingface_hub import snapshot_download
6import sys
78repo = snapshot_download("kaaaaan/live-vs-studio-classifier")9sys.path.insert(0, repo)10import predict
1112classifier = predict.Classifier()13result = classifier.classify("path/to/song.mp3")14print(f"{result['label']} ({result['confidence']:.2f})")15# -> live (0.91)
song.mp3
prediction: live
confidence: 0.913 (3/3 live)
per-window p(live): 0.872 0.940 0.928
(three windows at 25/50/75% of usable span (240.0s clip))
The first call downloads the AST backbone (~350 MB from MIT/ast-finetuned-audioset-10-10-0.4593) and caches it; subsequent calls are fast. Apple Silicon and CUDA are auto-detected; pass device="cpu" to force CPU.
Browser (transformers.js / ONNX Runtime Web)
The repository ships an int8-quantized ONNX backbone (ast_backbone_int8.onnx, 89.5 MB) and JSON-encoded probe weights (probe-weights.json) for browser-side inference. The live demo at https://ziipo.github.io/LiveAudioClassifier/ uses exactly these files. See web/ in the GitHub repo for the reference implementation.
How it works
The classifier is a two-part model:
AST backbone (MIT/ast-finetuned-audioset-10-10-0.4593) — 86M parameters, pretrained on AudioSet to understand audio at a general level. Frozen during training.
Linear probe — 1,538 parameters. A single nn.Linear(768, 2) layer trained on the AST embeddings to make the live-vs-studio decision.
The probe weights are in probe-weights.json (~42 KB). The AST backbone is shipped as an int8-quantized ONNX file (~89 MB) for browser use; Python users load the original PyTorch backbone via transformers.
For each input clip, the pipeline takes three 30-second windows at 25/50/75% of the usable span, runs each through AST + the probe, and takes the majority vote.
What it was trained on
24,227 30-second audio clips, split ~80/10/10 into train/val/test at the track level (no clip leakage between splits):
Training script in the GitHub repo; not bundled here. Total training time was a few seconds on Apple Silicon MPS — the AST embeddings were extracted once and cached, and only the 1,538-parameter probe was trained.
How it compares to other approaches
Head-to-head against five recent open-weights audio LLMs and one alternative encoder on the same stratified 500-clip subset (250 live / 250 studio, seed 42), one 30-second clip at a time:
Approach
Accuracy
Notes
MERT-v1-330M + same probe architecture
96.0%
Music-pretrained encoder; ties this model on the full test split, edges it by 1.6 pp on the matched subset
AST + linear probe (this model)
94.4%
The deployed model; 95.5% on the full 2,401-clip split per-clip
Audio Flamingo 3 (NVIDIA, 7B) zero-shot
72.8%
Best zero-shot LLM in the comparison
Qwen2.5-Omni 7B (Alibaba) zero-shot
69.2%
MOSS-Audio 4B Instruct (OpenMOSS) zero-shot
68.4%
MOSS-Audio 8B Instruct (OpenMOSS) zero-shot
63.2%
Counterintuitively worse than the 4B
Gemma 4 12B IT (Google) zero-shot
58.0%
Random baseline
50.0%
MERT-pretraining is competitive with but not clearly better than AudioSet-pretraining for this task. The MERT probe wins 1.6 pp on the matched subset, ties on the full test split, and costs ~9× more inference latency and ~3.7× more parameters than the AST setup, with no quantized browser-ready export path, so AST is what's included here.
A note on the numbers: the headline 94.46% and 93.93% accuracies above are per-song majority-voted across three windows per song (how the model is actually used). The comparison table here is per-clip — one 30-second window scored independently — because that's how the LLMs were tested. The AST's per-clip number on the full 2,401-clip test split is 95.5%; on the matched 500-clip comparison subset it's 94.4%.
Limitations
Studio recordings made to sound live (reverb-heavy production, room mics, single-take sessions) can be misclassified as live. Very clean soundboard-style live recordings can occasionally go the other way.
Short audio under 5 seconds is rejected; 5-30s is padded to 30s and gets a single window; 60s+ gets the full three-window treatment.
First call is slow while the AST backbone downloads / loads (~350 MB PyTorch / ~89 MB ONNX). Cached afterward.
License
MIT for the probe weights, inference code, and configuration. The AST backbone (MIT/ast-finetuned-audioset-10-10-0.4593) is also MIT.
Training data sourced from external sources (FMA: CC-licensed per-track; Internet Archive Live Music Archive: per-band CC variants) is not redistributed in this repository.
@misc{liveaudioclassifier-2026,
title = {Live-vs-studio music classifier (AST + linear probe)},
author = {Ken},
year = {2026},
url = {https://huggingface.co/kaaaaan/live-vs-studio-classifier},
}