# How do I measure frequency of an audio file into an array?

So I know how to plot fft the audio file within Matlab and a window pops up. My question is, what next? I want to know how to go about measuring the frequency(s). I have two similar audio files, of two people saying the same thing, and i want to see if there's a relationship (correlation) between their voices in terms of frequencies and speed (bpm)

• Welcome to DSP.SE! As the message above says, we need more information to try to figure out what you need to be answered. You have your signal x, you have its FFT X = fft(x). Why did you take the FFT? What information / processing are you trying to do? Your question doesn't make this clear. – Peter K. May 6 '16 at 16:34
• I want to know how to go about measuring the frequency(s). I have two similar audio files, of two people saying the same thing, and i want to see if there's a relationship (correlation) between their voices in terms of frequencies and speed (bpm). – rez0nance May 6 '16 at 16:56
• Ok! Can you please edit your question to add this info? – Peter K. May 6 '16 at 17:03
• Done. Do you have any suggestions? – rez0nance May 6 '16 at 17:04

Speech processing is a very long and detailed topic, but let's make a start.

Correlation

This probably won't work, but the first thing you can try is cross-correlation of the signals.

xc = xcorr(speaker_1, speaker_2);


Note that really all you may get out of this is the delay between each sample (if you're lucky).

You might also get some level of correlation coefficient by taking the peak value of

xc = xcorr(speaker_1/std(speaker_1), speaker_2/std(speaker2));


Where Next?

If that doesn't work (I'm not hopeful), you will need to look at lots of other options:

• Blocking the data into frames
• Finding features within these frames (LPCs, etc.).
• Using some method to time-align these between speech samples (DTW)
• Finding some measure of "likeness" between the time-aligned features.