Live-vs-studio music classifier

A neural network that listens to a piece of music and predicts whether the recording is a live recording or a studio recording.

Headline numbers

Test set Accuracy
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)

# Install
pip install librosa torch transformers huggingface_hub

# Download the model files and predict
from huggingface_hub import snapshot_download
import sys

repo = snapshot_download("kaaaaan/live-vs-studio-classifier")
sys.path.insert(0, repo)
import predict

classifier = predict.Classifier()
result = classifier.classify("path/to/song.mp3")
print(f"{result['label']} ({result['confidence']:.2f})")
# -> live (0.91)

Or as a one-liner CLI:

python -c "
from huggingface_hub import snapshot_download
import subprocess, sys
repo = snapshot_download('kaaaaan/live-vs-studio-classifier')
subprocess.run([sys.executable, f'{repo}/predict.py', 'song.mp3'])
"

Example output:

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:

  1. 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.
  2. 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):

Source Clips Label
Internet Archive Live Music Archive 10,149 live
Free Music Archive (fma_small) 7,994 studio
Personal collection 6,084 live
Total 24,227 67% live / 33% studio

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.

Acknowledgements

Citation

@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},
}
Downloads last month
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for kaaaaan/live-vs-studio-classifier

Quantized
(5)
this model

Space using kaaaaan/live-vs-studio-classifier 1

Evaluation results

  • Auto-split test accuracy (per-song majority vote) on 24K-clip auto-split test (2,401 clips)
    self-reported
    0.945
  • Adversarial source-quality test accuracy on source-quality adversarial test (2,043 clips, 150 IA shows)
    self-reported
    0.939