Hi, I am looking an audio library that allows me to import an audio file, and extract frequencies from it as well as to play the audio file. What should I use?
Hi @rusty_programmer, welcome on this forum (and Merry Christmas, if you’re into that).
I don’t think there is a library that does all three (importing audio file, extracting frequencies and playing it). So you’ll probably have to use different libraries for that and combine these.
- For importing audio files, you can use
sndfile, just to name some that I know (I’ve never used either myself).
- I’m not sure what you mean by extracting frequencies. Do you mean something like the short-term FFT?
- For playing audio files, you can use
rodio, which does both reading audio files and playing it, but there were many questions about rodio on this forum where I advised to encourage using
rodiois built on top of
cpal), so I would use
cpalfrom the start of the project.
Extra tip: you can use https://lib.rs/ to discover crates in the rust ecosystem.