简体   繁体   中英

Java Reading/Manipulating Wav File

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.

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM