I'm doing some research on how to compare sound files(wave). Basically, I want to compare stored soundfiles (wav) with sound from a microphone. So in the end I would like to pre-store some voice commands of my own and then when I'm running my app I would like to compare the pre-stored files with input from the microphone.
My thought was to put in some margin when comparing because saying something two times in a row in the exactly same way would be difficult I guess.
So after some googling I see that Python has this module named wave and the Wave_read object. That object has a function named readframes(n):

Reads and returns at most n frames of
audio, as a string of bytes.

What do these bytes contain? I'm thinking of looping thru the wave files one frame at the time comparing them frame by frame.
The first thing you should do is a fourier transformation to transform the data into its frequencies. It is rather complex however. I wouldn't use voice recognition libraries here as it sounds like you don't record voices only. You would then try different time shifts (in case the sounds are not exactly aligned) and use the one that gives you the best similarity - where you have to define a similarity function. Oh and you should normalize both signals (same maximum loudness).
What does a audio frame contain?