Get values from an audio file

Asked

Viewed 123 times

0

I’m trying to use a c++ library to detect frequencies of a sound. To use it I need to pass a double type vector with the audio samples. I managed to get a vector but for that I had to use android for it to pick up audio from the microphone read on a double and record this vector on an arquvi txt. I already have the file in .wav. As I do to take this audio file, filling a vector double for me to pass to the function that makes the detection of audio frequencies without using android, with the own c++ or even some program that does this?

  • There are already several libraries in both C and C++ for this. You can consult them here

  • Why record it on file? set the vector to a fixed size, usually use a size of "4096", walk through your audio file every 4096 samples and send the filled vector to

  • @ederwander there is some library that already reads . wav and returns me the vector of type double? For example, I pass to it a file . wav and and it returns me all samples or I pass the audio and the number of samples I want it to return to me, something like that.

  • hi yes take a look at that lib link

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.