Skip to main content

audiveris-py

Thin Python wrapper around the Audiveris command line, for converting PDF or image scores to MusicXML. It does not reimplement any recognition: it runs audiveris -batch -export and returns the files that run produced.

Requirements

  • An installed Audiveris. It is found via --audiveris/the audiveris= argument, the AUDIVERIS_BIN environment variable, audiveris or Audiveris on PATH, or the installer's default location (/opt/audiveris/bin/Audiveris, C:\Program Files\Audiveris\Audiveris.exe, /Applications/Audiveris.app/Contents/MacOS/Audiveris).
  • Python 3.9+. No third-party runtime dependencies.

Install

pip install audiveris-py

Or the latest development version:

pip install git+https://github.com/leonarduk/audiveris-py.git

Check your setup

audiveris-py doctor
[ OK ] Audiveris executable: /opt/audiveris/bin/Audiveris
[ OK ] Audiveris starts: version 5.7.1
[WARN] OCR language data: no *.traineddata in ~/.config/AudiverisLtd/audiveris/tessdata; lyrics and other text will not be recognised
       -> Download e.g. eng.traineddata from https://github.com/tesseract-ocr/tessdata into ~/.config/AudiverisLtd/audiveris/tessdata.

It exits non-zero if Audiveris can't be found or won't start. Missing OCR language files are only a warning: notes are still recognised, text isn't.

doctor is reserved as the first argument; to convert a file literally named doctor, pass it as ./doctor.

Command line

audiveris-py score.pdf -o out/
audiveris-py score.pdf -o out/ --sheets 1 2 --uncompressed --timeout 900

Each input name.pdf is exported as out/name/name.mxl, or out/name/name.mvtN.mxl when the book holds several movements. --uncompressed also writes a plain .musicxml next to each .mxl.

Library

from audiveris_py import convert, read_musicxml

files = convert("score.pdf", "out/")
xml = read_musicxml(files[0])

convert raises AudiverisError when Audiveris exits non-zero (status 1 = failure, 2 = timeout, 3 = both) or exports nothing. The error carries returncode and the full console output.

Tests

pip install -e '.[test]'
pytest

The unit tests use a fake Audiveris executable. To also run against a real install:

AUDIVERIS_BIN=/path/to/Audiveris pytest

tests/data/chula.png is a sample score from the Audiveris project (AGPL-3.0).

Releasing

Publishing uses PyPI trusted publishing, so no API token is stored in GitHub.

  1. Bump version in pyproject.toml and merge to main.
  2. Create a GitHub release with tag v<version> (e.g. v0.1.0).
  3. The Publish to PyPI workflow checks the tag matches the version, builds, and uploads.

Release files for audiveris-py 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audiveris-py 0.1.0
File Size Uploaded
audiveris_py-0.1.0.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for audiveris-py 0.1.0
File Interpreter ABI Platform
audiveris_py-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.2 kB

Release files / audiveris_py-0.1.0.tar.gz

Download URL audiveris_py-0.1.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d109039dcc8fd76e935b4c049d7a61f767e780cb6bbfc955ac084175170855a5
BLAKE2b-256 checksum
How to use checksums
8f874c5e272d803b57b03767ee05ab0cf75709c5937cb03573f67942279b84c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / audiveris_py-0.1.0-py3-none-any.whl

Download URL audiveris_py-0.1.0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5be07ed0c71ee14c78c38e780708ddf4ca330fdc3cabc50665e7aa920d775e6
BLAKE2b-256 checksum
How to use checksums
fcf76a0b39786b62a3c4a0ef83c9252128b334f35ad2a00851e4ef221242c6a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page