I want to compare 2 audio files programmatically. For example: I have a sound file in my iPhone app, and then I record another one. I want to check if the existing sound matches the recorded sound or not ( - similar to voice recognition).
How can I accomplish this?
That's called Audio Fingerprinting. There exist some open source projects from which you can get some ideas. Take a look here: Audio Fingerprint - MusicBrainz.