Guitar Chord Recognition V3 β€” BTC Distilled

A lightweight temporal neural network distilled from BTC (Bi-Directional Transformer for Chord Recognition).

The model accepts guitar audio and predicts a sequence of musical chords with approximate timestamps.

Architecture

Property Value
Teacher BTC 170-class
Student 2-layer Bidirectional GRU
Teacher parameters 3,036,842
Student parameters 557,642
Parameter compression 5.45x
Input 144-bin log-CQT
Output 170 chord classes
Audio sample rate 22,050 Hz
Sequence length 108 frames

Training

Dataset: GuitarSet v1.1.0

  • Training: guitarists 00–03, 120 recordings
  • Validation: guitarist 04, 30 recordings
  • Test: guitarist 05, 30 recordings

The student was trained with supervised chord labels and frame-aligned BTC soft probability distributions.

Loss = supervised cross-entropy + 0.5 * KL divergence.

Evaluation

Both models were evaluated on the same held-out guitarist and identical eligible audio frames.

Metric BTC Teacher V3 Student
Parameters 3,036,842 557,642
Full-chord accuracy 65.71% 63.68%

Test evaluation:

  • 30 recordings
  • 6,275 evaluable frames
  • 63.77% reference-label coverage
  • Approximate accuracy retention: 96.9%

Performance by musical style

Style Teacher Student
Bossa Nova 25.15% 16.36%
Funk 26.63% 27.81%
Jazz 27.11% 3.11%
Rock 87.81% 91.16%
Singer-Songwriter 90.50% 90.33%

These are frame-weighted accuracies on compatible reference labels, not all possible guitar chords.

Usage

Clone or download this repository.

Install requirements:

pip install -r requirements.txt

Run inference:

python predict.py recording.wav

The script prints timestamped chord predictions and a simplified chord progression.

Inference uses the saved model weights, CQT normalization, and model configuration. BTC teacher weights are not required.

Limitations

  • Experimental model, not a production chord detector.
  • Weak performance on Jazz and Bossa Nova recordings.
  • Evaluation excludes unsupported or altered chord labels.
  • No-chord predictions have not been separately validated.
  • Chord timestamps are approximate one-second summaries.
  • Generalization to arbitrary guitars, tunings, microphones, and environments is not established.
  • Personal microphone recordings were used for qualitative testing, not a measured accuracy benchmark.
  • Model size reduction does not establish inference speedup.

Credits

Teacher: BTC, Bi-Directional Transformer for Musical Chord Recognition (Park et al., ISMIR 2019).

https://huggingface.co/puar-playground/btc-chord

Original BTC repository: https://github.com/jayg996/BTC-ISMIR19

Dataset: GuitarSet by Xi, Bittner, Pauwels, Ye and Bello (ISMIR 2018), version 1.1.0.

https://doi.org/10.5281/zenodo.3371780

GuitarSet is CC BY 4.0. BTC is MIT-licensed. This project is not affiliated with or endorsed by the original model or dataset authors.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support