Reputation: 4265
I'm trying to compare .wav files for similarity. I used the google musicg library for that but I get bad scores for similar sounds. I compare two car motor sound from the same car and the recordings sounds are very similar to a human voice but I get fingerprintSimilarity scores like 0.012468828. The recordings are made with a microphone.
What is the reason for getting these bad scores?
I use:
Wave wave = new Wave("wav1.wav");
Wave wave1 = new Wave("wav4.wav");
FingerprintSimilarity fingerprintSimilarity = wave.getFingerprintSimilarity(wave1);
float score = fingerprintSimilarity.getScore();
float similarity = fingerprintSimilarity.getSimilarity();
System.out.println("Similar sound :"+ "Score : " + score + "\n Similarity : "+ similarity);
My goal is to create a program that can find a car model from its motor sound.
Are there other libraries which are working better or is it a problem of audio-fingerprints?
Upvotes: 1
Views: 1989
Reputation: 1931
You should be based on fingerprints.
What you should do however is:
As you can see it is not just as simple as it is for music. The reason is that for music some people have already done the above (many, many times) and have developed models for similarity. For your domain and application specific model I haven't heard of anything. Thus, either you should check in sound events similatiry papers or check that someone maybe have developed an app for sound events (cause what you have is a sound event).
P.S. For the above steps you can use MARSYS, JAudio, Sonic Visualizer and MIRToolbox along with WEKA.
Upvotes: 1
Reputation: 698
As the names suggest, the library you are using is developed for analysis of music. The similarity measure is trying to find "fingerprints", i.e. distinctive pieces of sound, whereas the sound of motor is very monotonic, I would guess the algorithm ends up finding really weird pieces and comparing them - this scenario is unlikely to get you good results.
If your goal is to analyze the sounds of different motors for similarities, you should try using plain spectral analysis. If you plan analyzing music, on the other hand, you better try your algorithm on pieces of real music.
Upvotes: 1