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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
torchcrepeV2-0.2.0.tar.gz
(70.8 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torchcrepeV2-0.2.0.tar.gz.
File metadata
- Download URL: torchcrepeV2-0.2.0.tar.gz
- Upload date:
- Size: 70.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de03074f7ac7b0cf0b506f1900e5f323578d2aad97f23b726fd39d4a7bc40e7b
|
|
| MD5 |
60653f8b72991bb3132a4afe52c07b9a
|
|
| BLAKE2b-256 |
d1109a790948d30381de45466851677d2505c4192e8b7313de045e293b38e43f
|
File details
Details for the file torchcrepeV2-0.2.0-py3-none-any.whl.
File metadata
- Download URL: torchcrepeV2-0.2.0-py3-none-any.whl
- Upload date:
- Size: 70.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f23b5133833394cfbfc5c0140809e8ebd7b068e08063bd56f004838feec4572
|
|
| MD5 |
1bf6436b1329ad508f8472db91e22a03
|
|
| BLAKE2b-256 |
28cbe68148aafab2b9acef695562c44b08781d9102f173696e06972aeadcdc4b
|