basic-pitch
Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection.
What it is and what it does
Basic Pitch is a Python library for automatic music transcription that converts audio files into MIDI with pitch bend detection. It uses a lightweight neural network developed by Spotify's Audio Intelligence Lab and is designed to be easy to install and use via pip. The library is instrument-agnostic and supports polyphonic note detection, meaning it can transcribe multiple notes played simultaneously across different instruments.
The package provides both a command-line tool and a programmatic Python API. It comes with the original TensorFlow model plus CoreML, TensorFlowLite, and ONNX variants for cross-platform inference. By default, it selects the runtime based on your operating system and Python version to minimize installation overhead, though you can override this choice. The library accepts any audio codec that librosa supports and outputs MIDI files, raw model predictions, or note event data.
Use it for:
- Transcribe solo instrument recordings to MIDI for music notation or further editing
- Build batch processing pipelines to convert multiple audio files to MIDI using the command-line tool
- Integrate pitch detection into a music analysis application via the predict() API
- Export model outputs as CSV note events or NPZ arrays for custom downstream analysis
- Sonify predicted MIDI back to audio for verification or comparison with the original recording
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Basic Pitch converts audio files to MIDI transcriptions with pitch bend detection using a lightweight neural network, supporting polyphonic and instrument-agnostic note detection.
Yes, with conditions. Basic Pitch is production-stable and has no known vulnerabilities, making it suitable for audio-to-MIDI transcription tasks. However, the package is dormant (last release 728 days ago), so verify that the license is compatible with your use case (it is currently unclear in the metadata) and that all 13 runtime dependencies resolve cleanly on your platform. If you need active maintenance or support, consider whether the lack of recent updates is acceptable for your project.
Install
basic-pitch on PyPI
pip
pip install basic-pitchuv
uv add basic-pitchpoetry
poetry add basic-pitchInstalling basic-pitch
Before you install
Low install friction with a pure-Python wheel. However, the package is dormant (728 days since last release) and depends on 13 runtime libraries including TensorFlow variants and multiple model serialization backends, which may complicate dependency resolution on some systems.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is available in the metadata. Verify the actual license before using in proprietary or commercial projects.
Quickstart
pip install basic-pitch
from basic_pitch.inference import predict
from basic_pitch import ICASSP_2022_MODEL_PATH
model_output, midi_data, note_events = predict('audio.wav')
By default, Basic Pitch does not install TensorFlow unless Python >= 3.11; instead it installs CoreML (macOS), TensorFlowLite (Linux), or ONNX (Windows). Requires a compatible audio codec supported by librosa.
Verify before relying
- Whether the package license is compatible with your use case (license metadata is absent from PyPI record)
- Current state of the GitHub repository and whether dormancy indicates maintenance has ceased or paused
- Whether all 13 runtime dependencies resolve cleanly on your target platform and Python version
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — librosa, mir-eval, numpy, pretty-midi, resampy, scikit-learn, scipy, typing-extensions, tensorflow, coremltools, tensorflow-macos, tflite-runtime, onnxruntime |
| Maintenance | dormant — 728 days since the last release |
| First released | |
| Downloads | 172,537/month — #10,333 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: basic_pitch-0.4.0-py2.py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
torchcrepePyTorch implementation of the CREPE pitch…
permissive · top 15,000 on PyPI
aubioaubio is a Python wrapper around a C library…
copyleft · top 15,000 on PyPI
stftpitchshiftShifts the pitch and timbre of audio signals…
permissive · top 15,000 on PyPI
python-stretchPitch-shifts and time-stretches audio using the…
permissive · top 15,000 on PyPI
torchfcpeTorchFCPE estimates fundamental frequency…
permissive · top 15,000 on PyPI
symusicsymusic parses and transforms MIDI and ABC…
permissive · top 15,000 on PyPI
pretty-midiProvides utilities for reading, modifying, and…
permissive · top 15,000 on PyPI
pyrubberbandProvides Python wrappers for time-stretching…
permissive · top 15,000 on PyPI
music21music21 is a Python toolkit for analyzing,…
permissive · top 15,000 on PyPI
audiomentationsAudiomentations applies randomized audio…
permissive · top 15,000 on PyPI