MATLAB: Autocorrelation and Alignment

signal processing

I have a speech signal with 18000 samples. Call this the original signal. Also, I have the same speech signal with a time delay. Now, the task I need to achieve is to auto correlate the signals and align the signal to the original signal time index.
Can you please help me with it. Thank you.

Best Answer

1. Use XCORR in the Signal Processing Toolbox to find the correlation between the two signals;
2. Find the index of the max value of the correlation output - n;
3. If L is the length of the two signals, the delay between the two signals is abs( n-L ).
Related Question