How to compare two sound files?

JAYAVARDHAN's picture
Hi dudes,
I have a requirement.Can you please help me in this issue.The Requirement is
"I have to compare two sound Files and give the result" I'm on java-platform.Possibly send me the reply in the Java Format.

Thank you in advance
Jayavardhan
dipan's picture

This depends on what type of

This depends on what type of files they are and what is your purpose. 

for example if you just want to check if the same identical MP3 files are lying at two places in HDD to be compared than it requires to have just a binary file comparison like diff - this is as good as comparing any file. 

However, if you want to see if two different files has the same song letsay - then you have to decode both files using any standard decoder (in your case consider looking at JMF - Java media framework). This will give you samples of each of the files -a long of array of distinct values. after this you can find the difference between the two. this way you can compare between a MP3 with any other format as well. You must ensure that Sampling rate and typical sound level of files are same. 

Sometimes one can just compare few minutes of audio initially to make a quick check.

Dipan

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
Thank you for using Captcha to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.