How To Compare Two Sound Files In Java

How To Compare Two Sound Files In Java 3,9/5 9332reviews
How To Compare Two Sound Files In Java

Java.NET Framework. I'm trying to write a program than can take two audio files (e.g. WAV) as inputs, compare them, and spit out a number that tells you how. Checking for differences between two (large). _File1 and _File2 are 2 files >1.5GB of type java.io.File. Since you are comparing two files byte-by-byte.

Kieran wrote: >Hello, >I am trying to compare two similar audio files (WAV). From what i have >read i need to sample both audio files at certain frequencies and run >these through a FFT and then compare the results. Can anyone advise me >if this is the correct approach and also describe the steps i need to >take to get to the stage where I can compare the files. WAV files contain sampled data (at any of a variety of rates). What would sampling them involve?

What does it mean to compare similar sounds? Can you define similarity with software? Jerry -- Engineering is the art of making what you want from things you can get. &#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#;&#; ** Posted from **. On Oct 8, 10:15&#;am, Jerry Avins wrote: >kieran wrote: >>Hello, >>I am trying to compare two similar audio files (WAV).

From what i have >>read i need to sample both audio files at certain frequencies and run >>these through a FFT and then compare the results. Monkey King Private Server more. Can anyone advise me >>if this is the correct approach and also describe the steps i need to >>take to get to the stage where I can compare the files. >>WAV files contain sampled data (at any of a variety of rates). What >would sampling them involve? I think that is what he is trying to figure out.:) >What does it mean to compare similar sounds? Can you define similarity >with software? Again, I think he is asking for help from someone to do that for him:) To OP: 1.

Do whatever is necessary to convert.wav files to their discrete- time signals: 2. Time-warping might or might not be necessary depending on difference between two sample rates: 3. After time warping, truncate both signals so that their durations are equivalent. Compute normalized energy spectral density (ESD) from DFT's two signals:. Compute mean-square-error (MSE) between normalized ESD's of two signals: The MSE between the normalized ESD's of two signals is good metric of closeness. If you have say, 10.wav files, and 2 of them are nearly the same, but the others are not, the two that are close should have a relatively low MSE. Two perfectly identical signals will obviously have MSE of zero.

Ideally, two 'equivalent' signals with different time scales, (20-second human talking versus 5-second chipmunk), different energies (soft-spoken human verus yelling chipmunk), and different phases (sampling began at slightly different instant against continuous time input); should still have MSE of zero, but quantization errors inherent in DSP will yield MSE slightly greater than zero. -Le Chaud Lapin. On Oct 8, 6:48 pm, Le Chaud Lapin wrote: >On Oct 8, 10:15 am, Jerry Avins wrote: >>>kieranwrote: >>>Hello, >>>I am trying to compare two similar audio files (WAV). From what i have >>>read i need to sample both audio files at certain frequencies and run >>>these through a FFT and then compare the results. Can anyone advise me >>>if this is the correct approach and also describe the steps i need to >>>take to get to the stage where I can compare the files. >>>WAV files contain sampled data (at any of a variety of rates). What >>would sampling them involve?