CREPE<T>
Models & Types · AiDotNet.Audio.MusicAnalysis
CREPE (Convolutional Representation for Pitch Estimation) neural pitch detector.
Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → CREPE<T>
Implements: IPitchDetector<T>
For Beginners
CREPE listens to a single voice or instrument and tells you exactly what note is being played. It’s like a very accurate guitar tuner powered by AI. It takes small chunks of audio and outputs which pitch (frequency) is most likely present.
Usage:
How It Works
CREPE (Kim et al., 2018) is a deep convolutional network for monophonic pitch detection. It operates directly on the audio waveform (1024 samples at 16 kHz) and outputs a 360-dimensional vector representing pitch salience across 20-cent bins from C1 to B7. CREPE outperforms traditional methods (YIN, pYIN) especially in noisy conditions.
Constructors
| Constructor | Summary |
|---|---|
CREPE(NeuralNetworkArchitecture<T> architecture, CREPEOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
Creates a CREPE model in native training mode. |
CREPE(NeuralNetworkArchitecture<T> architecture, string modelPath, CREPEOptions options) |
Creates a CREPE model in native training mode. |
Properties
| Property | Summary |
|---|---|
double MaxPitch { get; set; } |
|
double MinPitch { get; set; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<PitchFrame<T>> ExtractDetailedPitchContour(Tensor<T> audio, int hopSizeMs) |
|
ModelMetadata<T> GetModelMetadata() |
|
T MidiToPitch(double midiNote) |
|
T[] ExtractPitchContour(Tensor<T> audio, int hopSizeMs) |
|
ValueTuple<T, T>? DetectPitchWithConfidence(Tensor<T> audioFrame) |
|
ValueTuple<bool, T> DetectPitch(Tensor<T> audioFrame) |
|
double GetCentsDeviation(T pitchHz) |
|
double PitchToMidi(T pitchHz) |
|
string PitchToNoteName(T pitchHz) |