Electro Mini
guitar audio-to-tab transcription on MLX
2 min readupdated
This model takes guitar audio recordings and outputs tabs complete with strings, frets, timing, playing techniques, pick strokes, and beat positions. Built by David Akhmedbayev as part of the Harkn project, it is a compact 8.7M-parameter encoder-decoder transformer (an attention-based sequence-to-sequence architecture). Everything—from the synthetic data generator and tokenizer to the model itself and its training loop—was built from scratch on Apple MLX without third-party weights or pretrained checkpoints. It is a great fit for musicians, audio tool developers, and anyone testing lightweight audio models on Apple Silicon.
Key features
- Transcribes strings, frets, timing, 13 playing techniques (bends, slides, hammer-ons, pull-offs, vibrato, harmonics, palm muting, and more), pick strokes, and beat subdivisions.
- Built entirely from scratch on MLX: features the custom Electro Synth generator, a 1,053-token vocabulary, 4 encoder layers, and 4 decoder layers.
- Trained on 100,000 synthetic clips (194 hours of audio, 4.2M notes) with randomized electric, acoustic, and nylon guitars, full mixes, and guitar-free tracks.
- Uses the epoch 33 checkpoint (0.2835 validation loss) out of 60, as overfitting began past that point.
What you can do
- Transcribe guitar riffs, arpeggios, and parts from WAV or other librosa-supported audio formats into text tabs or JSON note lists.
- Generate fitting guitar parts for guitarless backing tracks (which made up 20% of the training dataset) or isolate parts inside a full band mix.
- Integrate
load_modelandtranscribeinto a local Mac transcription tool using the--fp16flag for faster inference.
Example
import json
from transcribe import load_model, transcribe, ascii_tab
model = load_model("model.safetensors", fp16=False)
stats = json.load(open("spectrogram_stats.json"))
result = transcribe("my_riff.wav", model, stats)
print(ascii_tab(result["notes"]))Read more
DetailsMetrics across 4,949 synthetic test clips: Tab F1 (string + fret within ±50 ms) — 89.9%, Pitch F1 — 93.2%, and 50.4% of clips transcribed completely error-free.
On 60 isolated live notes (strings 1–6, frets 0–19): accurate pitch — 92% (55/60), exact string and fret — 33% (20/60).
Training: ~7 hours on a single Mac Studio (M2 Max); float32 weights take up 35 MB.
Limitations: standard tuning and guitar only, 10-second context windows, greedy decoding without KV caching, and slow CPU inference (1 to several minutes per 10 seconds of dense playing).










Comments