--- id: torchcrepe version: "0.0.24" license: MIT license_treatment: permissive maintenance: aging --- # torchcrepe — Pytorch implementation of CREPE pitch tracker License: permissive · Maintenance: aging · Downloads: 295.8K/mo ## 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 above — 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 pip install torchcrepe uv add torchcrepe 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 295.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pitch detection audio, fundamental frequency estimation, crepe pitch tracker pytorch, audio pitch extraction, speech pitch analysis, music pitch recognition, f0 estimation neural network, audio-processing, pitch-detection, deep-learning [View on SkillFed](https://skillfed.io/packages/torchcrepe) · [View on PyPI](https://pypi.org/project/torchcrepe/)