How do I measure frequency of an audio file into an array?
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.