chudyksg
asked on
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?
You would have to do some testing/human evaluation to decide on threshold value for D.
ASKER
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.
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.
ASKER
What if they have different length? Then they are not going to produce similar fft values in similar order
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?
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?
ASKER
yep recognizing sound such as glass breaking, tv noise, washing machine noise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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