Comparing audio (wav) files

A

aten

I'm writing a program that has a section that requires the comparison
of two wav files. The sound files will be really small. I'm
interested in sounds like a hand clap, or wood hitting wood, or wood
striking tin. Little sounds. My section of the program would read two
sound files into memory, apply some sonic algorithm on both. The
output of that algorithm should be stored in some data structure. Then
a comparison of the output would be made and would return some value
to determine how closely one sound resembles the other, or at least if they
matched. This program can be written in Java or C++. Are there in
classes available that will allow me to implement what's describe
above easily? I'm more concerned about the algorithm to extract
frequency data, or whatever data is needed from the wav file to
compare it to another. I'm trying to avoid re-inventing the wheel
here, so if there is some package available that allows for this I
would greatly appreciate any info on where to get it..
 
R

Roedy Green

I'm trying to avoid re-inventing the wheel
here, so if there is some package available that allows for this I
would greatly appreciate any info on where to get it..

The simplest analyis would be to do a FFT analysis. Search for Fast
Fourier Transform. In the old days we did it in hardware. By now
software should be plenty fast enough.

This tells you the amount of sound in each frequency band over each
time band.

You might normalise some way before comparing.

Neural nets might do well at identifying the sounds from their
spectra.

They could learn to ignore hiss etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top