All projects
01Audio classification / ML2026Experimental

AI Music Detector

An experimental music classifier that analyzes uploads and microphone recordings using pretrained audio embeddings, with interactive visualizations and transparent model evaluation.

AI Music Detector analyzing a microphone recording, with a Likely AI-generated prediction, audio waveform, and sound-map visualization

The context

From an interesting idea to an inspectable system.

Music recorded through speakers can sound different from the clean files used to train a model. This project explores the human-versus-AI classification task from audio inspection through a deployed Streamlit app, comparing simple audio features with pretrained embeddings and testing augmentation with noise, echo, and volume changes.

My contribution

What I built

  1. 01

    Integrated a frozen EfficientAT audio encoder with a logistic-regression classifier trained on labeled human and AI music.

  2. 02

    Built an audio pipeline that checks recording quality and selects up to five 20-second sections across a track before combining their embeddings.

  3. 03

    Added microphone recording, file uploads, playback, waveform and sound-map visualizations, and model-performance views in Streamlit.

  4. 04

    Compared clean and simulated-room benchmarks, with training augmentation and artist/reference grouping across dataset splits.

Architecture

How the work moves

01Recording + quality check
02Selected audio sections
03EfficientAT embeddings
04Classifier + visualizations

Evidence

Documented results

011,000 recordings: 500 human + 500 AI, covering 12 AI generators
0286.7% accuracy on 150 original evaluation recordings
03Simulated-room accuracy: 74.0% to 78.7% with augmentation
04CPU inference with the included model; no paid inference API

Honest evaluation

Limits and trade-offs

  • The evaluation recordings were reused across experiments, so the reported results are a comparison benchmark rather than a fresh blind test.
  • Evaluation covers Rock and Electronic music. Performance on real phone recordings, other genres, and unfamiliar generators has not been established.
  • The model score is not a calibrated probability of AI authorship, and a prediction is not proof of who made a song.
  • On the original evaluation files, the final model detected 63 of 75 AI tracks and mislabeled 8 of 75 human tracks. Music combining human and AI work falls outside the two-label setup.

Inspect the work

Stack and reproduction

  • Python
  • Streamlit
  • scikit-learn
  • PyTorch
  • EfficientAT
  • librosa
  1. 1Clone the repository and install Python 3.12 and uv.
  2. 2Run uv sync --locked, then uv run --locked streamlit run app.py. The trained model is included.
  3. 3Record through the microphone or upload a WAV, MP3, FLAC, or OGG file lasting 10 seconds to 5 minutes, up to 50 MB, then select Analyze recording.