I will record my own voice and save them as wav files in my computer. Later on I will speak and computer should match my voice command with preexisting/pre-recorded wav files..
Question: How to check two audio data are equal or there is 80%match between two audio?
if(audio1 == audio2)
DO Task A
else if( audio1 is a bit similar to audio 2)
DO TASK B
else if( audio1 (80% match) audio 2)
DO TASK C
end if
What is the best way to compare two audio data?
By similar, do you mean purely numerically? In which case a cross correlation type analysis might suffice. Otherwise, if you mean similar in terms of a human listeners auditory perception of the sound sample then you need to read up on acoustic fingerprinting.
EDIT:
I'm guessing from your update that you want to do a simple form of speech recognition, correct? If this is the case, then your best option for obtaining the optimum match for a signal within a very limited corpus is a Dynamic Time Warping (DTW) based recogniser. Hidden Markov Model based recognition systems are the state-of-the-art, but a DTW based system will be vastly more simple to implement.