http://qs1969.pair.com?node_id=169899


in reply to How to compare 2 wav files.

Of course there is allways the trivial case when we are talking about two wave files that both are originally the same sample. In that case we simply search for similar byte patterns. But, as most comments seem to take for granted, shadox is probabely talking about two different samples, say two mikes picking up the same sound source, right?

Replies are listed 'Best First'.
Re: Re: How to compare 2 wav files.
by shadox (Priest) on May 28, 2002 at 20:55 UTC
    Well not totally right :)
    I will have some wav files about 5 second in lenght (each file) and a friend server will send me a wav file (5 seconds too), then i will compare his file with the files i have and i will say "That song is ......" or "I don't know that song" and my program will "learn" that song. This is just a learn project (not college or work project (: ) and i really apreciate all your help guys.
    ___________________________________________
    Optimus magister, bonus liber
      Okay, if you and your friend agree on which 5-sec portion to compare (e.g. always use the first 5 sec, not counting any initial silence that might be present), then you have a fairly good chance of building a DFT-based discriminator/identifier with a pretty good success rate.

      In this case, Perl could be very handy for driving the DFT/VQ engine on your friend's audio file, doing data reduction on that output, and running or maybe even computing the suitable statistics to identify a "best match" in your local database of first-5-sec snippets.

      Just building your local database of "song signatures" will be a very instructive exercise, and you can use it for both "training" and "testing". I could go on... but it would all be speculative, and you should work it out for yourself.

      If you allready have the file on your server, is it the same sample, f.i. extracted from the same music CD with same sample rate? Or might it be two different samples from two different LP records? Or could it be f.i. two different recordings of Beethoven's 5:th?
        I will have some files in a database the second file, or the file to compare will come from my friend server, and he will get tht files from an radio stattion with his computer. In fact it sounds dummy but the objective of my project is that the computer will do something when it "listen" the right song, exactly the same way when you wait for a song to play in a radio station, when you listen to it you will think "Thats the song i was waiting for", well i want to computer to do something like that :)
        ___________________________________________
        Optimus magister, bonus liber