Main Content

CREPE Postprocess

Postprocess output of CREPE pitch estimation network

Since R2023a

Libraries:
Audio Toolbox / Deep Learning

Description

The CREPE Postprocess block converts the output of a CREPE pretrained network to pitch estimates in Hz.

Examples

expand all

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.

Ports

Input

expand all

CREPE network activations, specified as an N-by-360 matrix, where N is the number of frames output by the CREPE neural network.

Data Types: single | double

Output

expand all

Estimated fundamental frequency in Hz, returned as an N-by-1 vector, where N is the number of frames in the input.

Data Types: single | double

Parameters

expand all

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.

Note

If the maximum value of the network output is less than the confidence threshold, the block returns NaN.

Tunable: Yes

Block Characteristics

Data Types

double | single

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

References

[1] 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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2023a