torchcrepe
Pytorch implementation of CREPE pitch tracker
What it is and what it does
torchcrepe is a PyTorch port of the CREPE convolutional pitch estimation model, originally developed for robust pitch tracking in speech and music. It loads pre-trained model weights (available in 'tiny' and 'full' variants) converted from the original TensorFlow implementation and uses them to extract pitch and periodicity estimates from audio.
The package provides multiple entry points: direct pitch prediction from audio arrays, batch processing from files, and extraction of intermediate embeddings from the fifth max-pooling layer. It includes post-processing tools for filtering noisy periodicity values, thresholding unreliable pitch estimates, and decoding strategies (Viterbi, weighted argmax, argmax) to reduce octave errors. A command-line interface and file-to-file convenience functions support workflow integration.
Use it for:
- Extract pitch contours from speech recordings for prosody analysis or voice conversion applications.
- Analyze melody in music recordings for transcription, similarity matching, or music information retrieval tasks.
- Generate pitch embeddings from audio as pretrained features for downstream voice or music classification models.
- Batch process large audio corpora to compute pitch statistics or detect voiced/unvoiced regions.
- Build real-time pitch tracking pipelines for live audio applications using GPU acceleration.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyTorch implementation of the CREPE pitch tracker that estimates fundamental frequency and periodicity from audio signals using pre-trained neural network models.
Yes, if you need robust pitch estimation from audio. The package is well-established (first released 2020-08-01), has low install friction, carries no known vulnerabilities, and remains actively maintained. The aging status (455 days since last release) reflects stable maturity rather than abandonment. MIT licensing poses no restrictions. Primary gotcha: PyTorch must be installed separately and configured for your hardware before use.
Install
torchcrepe on PyPI
pip
pip install torchcrepeuv
uv add torchcrepepoetry
poetry add torchcrepeInstalling torchcrepe
Before you install
Low friction installation with a pure Python wheel. The package is aging (last release 455 days ago) but the repository remains active with recent commits. Requires PyTorch installation first, which is a system-dependent step documented in the package instructions.
License in practice
MIT license permits commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely as long as you include the original license notice.
Quickstart
pip install torchcrepe
import torchcrepe
audio, sr = torchcrepe.load.audio('file.wav')
pitch = torchcrepe.predict(audio, sr, hop_length=int(sr / 200.), fmin=50, fmax=550, model='tiny', device='cpu')
PyTorch must be installed first via system-dependent instructions at pytorch.org; GPU acceleration requires CUDA-compatible hardware and appropriate PyTorch build.
Verify before relying
- Whether the package works with recent PyTorch versions (no minimum version specified in metadata)
- Performance characteristics and inference speed on typical hardware
- Accuracy comparison with the original TensorFlow CREPE implementation
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — librosa, resampy, scipy, torch, torchaudio, tqdm |
| Maintenance | aging — 455 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 295,755/month — #7,915 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: torchcrepe-0.0.24-py3-none-any.whl
Keywords: pitch, audio, speech, music, pytorch, crepe
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
basic-pitchBasic Pitch converts audio files to MIDI…
unclear · top 15,000 on PyPI
torchfcpeTorchFCPE estimates fundamental frequency…
permissive · top 15,000 on PyPI
torchlibrosaProvides PyTorch implementations of librosa…
permissive · top 15,000 on PyPI
pyworldPyWorld wraps the WORLD vocoder to decompose…
unclear · top 15,000 on PyPI
pyrubberbandProvides Python wrappers for time-stretching…
permissive · top 15,000 on PyPI
torchaudioProvides PyTorch-based audio processing,…
permissive · top 5,000 on PyPI
juliusJulius provides differentiable, GPU-accelerated…
permissive · top 5,000 on PyPI
pyctcdecodeDecodes CTC (Connectionist Temporal…
permissive · top 15,000 on PyPI
torch-audiomentationsProvides PyTorch-native audio data augmentation…
permissive · top 5,000 on PyPI
panns-inferenceProvides pretrained neural network models for…
permissive · top 15,000 on PyPI