Sheet-Music-Recognition — Optical Music Recognition
Convert sheet-music images and scanned PDFs to MusicXML, MIDI, JSON and MP3
with offline optical music recognition (OMR). Sheet-Music-Recognition includes downloadable
model weights, a Java decoder and a Python API and command-line tool, available
as score-reader (PyPI package and command) and score_reader (Python import).
Quick start · Review demo · Benchmark · Documentation · Python / Java API · Downloads
Code and weights are Apache-2.0 licensed, including commercial and closed-source use. You do not need to publish your own code. Follow the license and notice requirements.
Install & Use
📱 Android Demo
Import a PDF or image, then generate a play-along track. Download on Google Play
🐍 Python/Java Usage
Requires Python 3.10 or 3.11 and Java 17+ on your PATH (or via JAVA_HOME).
python -m pip install "score-reader[pdf,audio]"
| Input image | Recognized score |
|---|---|
Listen to the preview · Inspect detected notes · Download MusicXML
Read a score
# Image to MusicXML and MIDI
score-reader score.png -o score.json --musicxml score.musicxml --midi score.mid
# PDF to an audio preview
score-reader score.pdf -o score.json --mp3 score.mp3
Processing runs locally. Every conversion writes JSON. Add --musicxml,
--midi, or --mp3 for the exports you need. MP3 uses a synthesized tone
and requires FFmpeg, which the audio extra supplies.
| Option | What it sets |
|---|---|
--pages 1,3 |
PDF pages to read |
--meter 3/4 |
Initial meter (default 4/4) |
--bpm 90 |
Initial quarter-note tempo (default 120 BPM) |
--key-fifths 2 |
Fallback key signature with two sharps when the starting key is missing or unreadable |
--instrument violin |
Resolve printed open-string harmonics using standard violin tuning |
Run score-reader --help for all options. API and output details · Standalone JAR and model downloads
What it supports
- Notation. Notes, chords, rests, clefs, accidentals, ties, slurs, grace notes, and dynamics. Reads repeats and endings, plus changes in key, meter, and tempo.
- Scores. Printed staff notation for piano, violin, and ensembles, including independently barred staves.
- Playback. MIDI and synthesized MP3 previews can follow recognized ritardandos, fermatas, tremolos, and piano pedal brackets. Playback details
- Guitar tab. Six- and seven-string tab with tuning headers, written rhythms including triplets, and effects such as hammer-ons, pull-offs, slides, bends, and vibrato. When rhythm is missing, the reader estimates it. Tab details · Guitar effects
- Exports. MusicXML reconstructs an editable concert-pitch score and leaves out the original page layout and tab placement. JSON includes note events and page geometry. Export formats
Integration and model
Use Interpreter and write_musicxml from Python, or SheetInterpreter.analyze()
from Java. See API examples and output format.
An optional native Java decoding service supports
bounded, source-matched geometry and analysis requests from local workers.
The Python reader runs bundled-model OCR automatically on images and scanned PDFs.
The separate shared Java OCR pipeline and optional ONNX
binding remain available for cross-platform evaluation. The optional
desktop ONNX segmentation adapter uses the pinned
v3 conversion without changing the default Python model.
The bundled v4 model comes from our own synthetic training lineage, without pretrained weights or commercial score scans. See the model card, evaluation, training guide and source origins.
See the contributor guide for source builds, tests, and bug reports.
Metadata
Release files for score-reader 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| score_reader-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for score_reader-0.1.8-py3-none-any.whl |
Release files / score_reader-0.1.8-py3-none-any.whl
| Download URL | score_reader-0.1.8-py3-none-any.whl |
|---|---|
| Size | 10.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95dd7edfb119e4764e1b8d658be7452f4fff7268d1baeaea2c2de77d6f125622
|
|
BLAKE2b-256 checksum How to use checksums |
388747ff761c97e475c604ffe0e82a63e956fae77f9062812ad23932e310725e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for score-reader 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for score_reader-0.1.8-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.