Does anybody know a good library that does pitch detection in the browser? Anything in Javascript or Webassembly would suffice. My target is mainly singing voices. I already tried pitchfinder, but for me it reports frequencies that are a half tone to low. Are there any alternatives other than implementing an alorithm your self?

  • $\begingroup$ i never listed code, but i have sorta illustrated an algorithm for pitch detection in a couple of different answers on this SE. $\endgroup$ – robert bristow-johnson Dec 31 '19 at 8:30
  • $\begingroup$ Hi Philipp, I'm sorry but asking for code written to a specification (here: pitch detection in the browser) is a bit off-topic here. General question: Doesn't Emscripten allow you to compile any C or C++ to WASM? $\endgroup$ – Marcus Müller Dec 31 '19 at 10:20

Try a samplerate of 48000 instead of 44100. Or vice versa.

  • $\begingroup$ This kinda solved the issue for me. Pitchfinder by default uses a sample rate 44.1k while Chrome records with 48k. $\endgroup$ – Philipp Siegmantel Jan 7 '20 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.