Electronic – How to compare two audio files

audiodsp

I have two recorded audio voice WAV files I have recorded by saying "Good Morning" twice.

I want to compare the two audio files and say both are identical.

How can I do that?
What is the right approach to achieve this?

Best Answer

I do agree with the comments about how this question is very difficult to answer in this community, but I would like to provide a few of the more simple methods for you to look into. Ultimately a good and robust system will require the use of many different techniques and many many hours. This is why there is tons and tons of money put into voice recognition, and as you may know, still isn't great.

In general, people will speak within about the same frequency range every time they say a command word. If you look at the frequency domain of your signal, you can record what range was used when the person recorded their command word and then look for that in the future. You can get to the frequency domain using the FFT, wikipedia and some google search can help you with what this means and how to do it.

You can expand the frequency method to determine what the frequency is for each part of the word. For example, some people will raise the pitch of their voice as they finish a word. This could be another "signature" to look at.

Also people will generally speak the same speed for the same command word. For this you can look at amplitude of your signal to determine how long it took them to say each word and even the pause between two words. Then you can compare these pauses to your future signal.

Again, these are just a few basic methods, but should get you a sense of the type of things that can be done.