skillfed

torchcrepe

Pytorch implementation of CREPE pitch tracker

torchcrepe v0.0.24 295.8K downloads/30d#7,915 on PyPI523
Permissive license MIT AGING released

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 torchcrepe

uv

uv add torchcrepe

poetry

poetry add torchcrepe

Installing 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

License :: OSI Approved :: MIT License

Tags

pitch detection audiofundamental frequency estimationcrepe pitch tracker pytorchaudio pitch extractionspeech pitch analysismusic pitch recognitionf0 estimation neural network
audio-processingpitch-detectiondeep-learning

More Artificial Intelligence packages