开发者_开发百科How can we get the amplitude,time values of an audio signal in java. I need to detect the peaks in the signal using these values.
Here's one web page describing the most common .wav(RIFF) file format:
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
Just unpack the array of samples from the file and convert the data type and/or endianess, as needed. Then you need to average or filter the absolute value or squared value of a set of PCM samples covering the time window of interest.
One way is to calculate the root mean square of the sound signal over a given time slice.
精彩评论