skillfed

basic-pitch

Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection.

basic-pitch v0.4.0 172.5K downloads/30d#10,333 on PyPI
License unclear DORMANT released

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-pitch

uv

uv add basic-pitch

poetry

poetry add basic-pitch

Installing 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

Development Status :: 5 - Production/StableNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

audio to MIDI conversionautomatic music transcriptionpolyphonic pitch detectionneural network transcriptioninstrument-agnostic note recognition
audio-processingmusic-transcriptionneural-networks

More Artificial Intelligence packages