Postprocess output of CREPE pitch estimation network
Audio Toolbox / Deep Learning
The CREPE Postprocess block converts the output of a CREPE pretrained network to pitch estimates in Hz.
Estimate Pitch Using CREPE Blocks
This example shows how to use the CREPE blocks to combine preprocessing, network inference, and postprocessing and obtain pitch estimations from an audio signal. See Estimate Pitch Using Deep Pitch Estimator Block for an example that uses the Deep Pitch Estimator block to perform the same task.
Adjust the parameters of the blocks to speed up computation and see the pitch estimations in real time as the audio plays.
Set the Overlap percentage (%) of the CREPE Preprocess block to
50. With a lower overlap percentage, the system processes frames less frequently.
Set the Number of output frames of the CREPE Preprocess block to
5. This causes the CREPE Preprocess block to buffer audio frames and pass them to the CREPE block in batches. Passing batches to the CREPE block improves computational efficiency by allowing it to process multiple frames in parallel. However, it also increases latency because the system outputs pitch estimations in batches instead of one at a time.
Set the Model capacity of the CREPE block to
Large. This model has fewer parameters than the full-size model, leading to faster computation at the cost of slightly lower accuracy.
Run the model to listen to a singing voice and view the estimated pitch in real time.
Port_1 — CREPE network activations
CREPE network activations, specified as an N-by-360 matrix, where N is the number of frames output by the CREPE neural network.
Port_1 — Estimated fundamental frequency
Estimated fundamental frequency in Hz, returned as an N-by-1 vector, where N is the number of frames in the input.
Confidence threshold — Pitch confidence threshold
0.5 (default) | scalar in the range [0, 1)
Pitch confidence threshold, specified as a scalar in the range [0, 1). In postprocessing, the block suppresses fundamental frequencies where the network confidence is below the threshold.
If the maximum value of the network output is less than the
confidence threshold, the block returns
 Kim, Jong Wook, Justin Salamon, Peter Li, and Juan Pablo Bello. “Crepe: A Convolutional Representation for Pitch Estimation.” In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 161–65. Calgary, AB: IEEE, 2018. https://doi.org/10.1109/ICASSP.2018.8461329.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2023a