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


in reply to Re: How to compare 2 wav files.
in thread How to compare 2 wav files.

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

Replies are listed 'Best First'.
Re: Re: Re: How to compare 2 wav files.
by graff (Chancellor) on May 29, 2002 at 01:55 UTC
    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.

Re: Re: Re: How to compare 2 wav files.
by jotti (Scribe) on May 29, 2002 at 11:34 UTC
    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
        Ok, got it! If one computer listens to the radio, which is an analog signal, the computer does the A/D conversion. If there are other wav files created by other computers in the same way, the digital data in the wav files differ, even if the sound source would be the same music CD. We have to stick to Fourier analysis and that kind of things.