Downloads · 30 days
0
FredrikKarlssonSpeech/torchcrepe-onnx
torchcrepe-onnx is a machine learning model from FredrikKarlssonSpeech. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for onnxruntime. The card lists the license as mit.
ONNX export of maxrmorrison/torchcrepe, a PyTorch implementation of CREPE (Kim et al., 2018), a convolutional neural network for monophonic fundamental frequency (F0) / pitch estimation directly from the raw waveform.
Downloads · 30 days
0
Access
Public
Updated Sep 7, 2026
Repo size
115 MB
Likes
0
Public
Click a slice to open those files.
.onnx115 MB · 100%
From the Hugging Face model README
ONNX export of maxrmorrison/torchcrepe, a PyTorch implementation of CREPE (Kim et al., 2018), a convolutional neural network for monophonic fundamental frequency (F0) / pitch estimation directly from the raw waveform.
This is an unmodified re-export of the upstream tiny/full checkpoints — same weights, same
architecture, only the serialization format changes. It is the same conversion already used in
production by superassp, an R package for acoustic phonetic analysis.
| File | Precision | Size | Notes |
|---|---|---|---|
onnx/tiny.onnx | fp32 | 1.96 MB | recommended |
onnx/tiny_fp16.onnx | fp16 | 1.00 MB | 95.6% bin agreement vs fp32 |
onnx/tiny_int8.onnx | int8 (dynamic) | 0.52 MB | 82.7% bin agreement vs fp32 |
onnx/full.onnx | fp32 | 89.0 MB | recommended |
onnx/full_int8.onnx | int8 (dynamic) | 22.3 MB | 78.8% bin agreement vs fp32, experimental |
full_fp16.onnx is intentionally not included — naive fp16 casting broke the full model
(only 37.8% pitch-bin agreement with fp32 on the validation audio; see CONVERSION_REPORT.md).
Use full.onnx (fp32) or, if size matters more than accuracy, full_int8.onnx.
input: "frames" float32 [num_frames, 1024] # one 1024-sample @16kHz window per row
output: "probabilities" float32 [num_frames, 360] # sigmoid activation per pitch bin, pre-decode
Framing and decoding are not part of the graph — you must do these yourself, exactly as the
original torchcrepe package does in Python:
[num_frames, 360] activation matrix.cents = 20 * bin + 1997.3794084376191) then to Hz (hz = 10 * 2^(cents/1200)).See maxrmorrison/torchcrepe's decode.py and convert.py for the exact reference math.
import numpy as np
import onnxruntime as ort
sess = ort.InferenceSession("onnx/full.onnx", providers=["CPUExecutionProvider"])
frames = np.zeros((1, 1024), dtype=np.float32) # replace with real 16kHz windows
(probabilities,) = sess.run(None, {"frames": frames})
bins = probabilities.argmax(axis=1)
cents = 20 * bins + 1997.3794084376191
hz = 10 * 2 ** (cents / 1200)
Re-exported directly from the upstream .pth checkpoints, opset 17. Verified numerically
identical (max abs diff ~1e-6, float32 noise floor) to the original PyTorch model, and
byte-for-byte identical inference output to the crepe.onnx files already deployed in
superassp. Full methodology and quantization drift numbers in CONVERSION_REPORT.md.
MIT, inherited from upstream maxrmorrison/torchcrepe. Please cite:
@inproceedings{kim2018crepe,
title={Crepe: A convolutional representation for pitch estimation},
author={Kim, Jong Wook and Salamon, Justin and Li, Peter and Bello, Juan Pablo},
booktitle={2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={161--165},
year={2018},
organization={IEEE}
}