Skip to main content

TorchCrepeV2

My own version of crepe in PyTorch, SOTA pitch tracking tool. Releasing as pip package for ease of usage.

Only full version of model is supported.

Similar project: https://github.com/maxrmorrison/torchcrepe

Usage

pip install torchcrepeV2

from torchcrepeV2 import TorchCrepePredictor
import librosa
import numpy as np
import matplotlib.pyplot as plt

y, sr = librosa.load("some_audio.wav", sr=16000)
torch_crepe = TorchCrepePredictor(device="cuda")

# all arguments are aligned with original crepe implementation
f = torch_crepe.predict(audio=y, 
                        sr=sr,
                        viterbi=True, 
                        center=True, 
                        step_size=10)

# can add some post-processing
block_size = 100
length = y.shape[0] // 100
if f.shape[-1] != length:
    f = np.interp(
        np.linspace(0, 1, length, endpoint=False),
        np.linspace(0, 1, f.shape[-1], endpoint=False),
        f,
    )

plt.plot(f, label='torchcrepe')
plt.show()

Results

Tracked pitch nearly identical as compared to crepe.

TODO

  • Add unit tests

Metadata

Release files for torchcrepeV2 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torchcrepeV2 0.2.0
File Size Uploaded Provenance Actions
torchcrepeV2-0.2.0.tar.gz 70.8 MB Without provenance Details for torchcrepeV2-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for torchcrepeV2 0.2.0
File Interpreter ABI Platform Actions
torchcrepeV2-0.2.0-py3-none-any.whl Python 3 none any Details for torchcrepeV2-0.2.0-py3-none-any.whl

Total release size: 141.5 MB

Release files / torchcrepeV2-0.2.0.tar.gz

Download URL torchcrepeV2-0.2.0.tar.gz
Size 70.8 MB
Tags Source
SHA-256 checksum
How to use checksums
de03074f7ac7b0cf0b506f1900e5f323578d2aad97f23b726fd39d4a7bc40e7b
BLAKE2b-256 checksum
How to use checksums
d1109a790948d30381de45466851677d2505c4192e8b7313de045e293b38e43f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.10

Release files / torchcrepeV2-0.2.0-py3-none-any.whl

Download URL torchcrepeV2-0.2.0-py3-none-any.whl
Size 70.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6f23b5133833394cfbfc5c0140809e8ebd7b068e08063bd56f004838feec4572
BLAKE2b-256 checksum
How to use checksums
28cbe68148aafab2b9acef695562c44b08781d9102f173696e06972aeadcdc4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.10

Security for torchcrepeV2 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page