Classify guitar technique from one-second audio

A machine-learning model identifies how a guitar is being played from compact audio windows, using MFCC, RMS energy, zero-crossing rate, and spectral features.

background
chords
palm muted
single note

Upload a 1-second guitar clip

No WAV uploaded

WAV up to 2MB
Upload WAV to play it here
PredictionAwaiting WAVConfidence--Upload WAV to analyze
Class probabilities
background
0.00
chords
0.00
palm muted
0.00
single note
0.00

Model results

The baseline logistic-regression model is trained on session metadata splits and evaluated on a held-out recording session.

95.3%

Validation balanced accuracy

400 validation clips

89.4%

Test balanced accuracy

428 held-out test clips

1.0s

Window size

16 kHz mono features

Balanced accuracy over baseline iterations
0.000.250.500.751.00
testvalidation
Confusion matrix, held-out test set
actual / predictedbackgroundchordspalm mutedsingle note
background118110
chords18938
palm muted028611
single note251091
Rendered test confusion matrix artifact from the model results directory
Rendered artifact from results/baseline/test_confusion_matrix.png

Pipeline overview

From recordings to predictions, each step is reproducible from the repository scripts.

1

Audio ingestion

Split raw WAV sessions into one-second clips with metadata-controlled splits.

2

Quality control

Flag silence, clipping, duration drift, duplicate clips, and amplitude outliers.

3

Feature extraction

Resample to 16 kHz mono, then compute MFCC, RMS, zero-crossing, and spectral features.

4

Model inference

Run the balanced logistic-regression classifier and return label probabilities.

Feature set

  • 13 MFCC means and standard deviations
  • RMS mean, spread, max, and 90th percentile
  • Zero-crossing rate
  • Spectral centroid, bandwidth, rolloff, and flatness

Live recognition

The repository includes a live prediction script for a guitar interface on macOS.

$ python3 src/live_predict.py --device 3 --channels 1

single_note  confidence=0.82 rms=0.04123 peak=0.512
single_note: 0.82 | palm_muted: 0.10 | chords: 0.06 | background: 0.02
Outputsingle notesmoothed over 5 windows