acoustic fingerprint

How to generate an acoustic fingerprint? I am programming in java. Are there any libraries or algorithms for doing this under LGPL? I am converting the sound file using FFT (using class for doing fft from this library http://sirk.sytes.net/). The output I am getting is FFT values which I assume by looking at the code are magnitudes of sound. How to generate and acoustic fingerprint that and how to compare it to check whether two sounds are matching?
chudyksgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

d-glitchCommented:
The FFT takes one or more time samples of sound and generates frequency spectra: how much of each
 frequency is included in the sample.

If two sound samples are the same, then their FFT's will be the same.

You can calculate the RMS difference of two FFT's fairly easily:

       D²   =   Sum(  (f_A0 - _fB0)²  +  (f_A1 - f_B1)²  +  ....  +  (f_An - f_Bn)²)/n
 



0
d-glitchCommented:
You would have to do some testing/human evaluation to decide on threshold value for D.
0
chudyksgAuthor Commented:
Yes but sometimes the sound samples are not going to be the same but will be similar. Then I would have to use some sort fuzzy logic, or fuzzy matching. E.g. If I record a sound of breaking glass and store the acoustic fingerprint in the database then I would record a sound of breaking glass again I would like to get an output that they match.
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

TommySzalapskiCommented:
If they are similar, then the RMS difference (D² above) will be low. As d-glitch already said, you'll just have to use testing to decide what levels you want to use to mean a match.
0
chudyksgAuthor Commented:
What if they have different length? Then they are not going to produce similar fft values in similar order
0
d-glitchCommented:
The FFT typically works with fixed length time samples.

If you were doing this in real time, you would store 100 ms of data,
then run it through an FFT, then do the template matching.
If there was a breaking window during that time, you would flag it.

Then you go on to the next 100 ms of data.

In addition to the FFT, you would also have to do some sort of level scaling.
A breaking window 30 feet from the microphone will not be as loud at one
5 feet away.

Are you really looking for breaking glass, or are you looking for more general
applications?
0
chudyksgAuthor Commented:
yep recognizing sound such as glass breaking, tv noise, washing machine noise
0
pmasottaCommented:
forget about RMS differences they include the mean value and they could be different; the same sound but different volume...

What you have to do is to "correlate" both FFTs by convolution, (be carefull this is different than "convolution by FFT")

Having the 2 FFT spectra the convolution of them will give you a new function that shows how correlated both FFT patterns are, from there you can discover if it is the same sound, shifted in frecuency, etc,etc...
It is not an easy topic, your proyect is quite ambitious...

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.