0

So I can get an array of all the bytes of a wav file, I just want to know how I can decode the raw sound data to something I can use to tell when the singer is speaking/his beat (I don't know the proper musical terms, sorry)

If there is an API or tutorial out there that someone could link me to, that would be swell since I can't seem to find anything good.

lsnow2017
  • 139
  • 1
  • 2
  • 13
  • Not sure much about this specific requirement, but I used to work with FFMpeg (https://www.ffmpeg.org/) when it came to audio files. You might find somethign good there. The community is also pretty active. – Himanshu Bhardwaj Sep 11 '14 at 03:33

2 Answers2

0

In general, detecting "the instances when something beats" in a wave file is not as one may imagine at the first thought.

A possible first step is to transform your .wav into a so-called "spectrogram." I don't think Java has a dedicated API for this purpose, but googling "java spectrogram" would give you a number of third-party examples.

I also found this question might be relevant.

P.S. I'm not a specialist in signal processing, so corrections are welcome.

Community
  • 1
  • 1
ntabee
  • 416
  • 2
  • 5
0

Will you know this beat in advance? If so, you could cross correlate the two signals and the highest peak in this output would correspond to the time delay.

Other than that, depending on the sound before the beat starts, you could convert to frequency domain (via FFT) and have a look at what frequencies are present and see whether there's a significant change when the beat begins.

Some examples/extra detail would help.

If you're trying to detect the tempo of said beat, please ignore everything most of what I've said.

Fraser
  • 91
  • 8