crepe icon indicating copy to clipboard operation
crepe copied to clipboard

Instructions for real-time pitch detection

Open DannySalem opened this issue 3 years ago • 3 comments

I'm interested in using crepe in an online app. I'd like to use crepe in a very similar way as it is used in the example website: marl.github.io/crepe/. The readme shows how to use it for wav files, is there somewhere I can find instructions on how to use it in real-time microphone input data?

DannySalem avatar Jul 05 '20 17:07 DannySalem

The crepe model uses a sampling rate of 16 kHz, and takes 1024 samples as input i.e. 64 milliseconds. You could pass every 1024 samples from your audio buffer into the model to get a prediction per 64 milliseconds. Of course you could use an even smaller hop size (e.g. 10ms as in the offline implementation). The only caveat to a real-time implementation is that you can't use the viterbi tracking to smooth the pitch curve. Hope this helps.

justinsalamon avatar Jul 06 '20 21:07 justinsalamon

@justinsalamon That helps thanks! I'd definitely be able to do it on my own but I was hoping the code for the github website would be available too somewhere but i couldnt find a repo for it. Is that available anywhere?

DannySalem avatar Jul 06 '20 21:07 DannySalem

It's the gh-pages branch. Hope this helps.

0b01 avatar Jul 13 '20 21:07 0b01