I've a signal $x(n)$. I've generated its delayed copy named $x1(n)$ and applied
xcorr function of MATLAB to find out the delay. It gives accurate delay.
Now I generated a noise signal and replaced the delay in $x1(n)$ by that noise. In this case,
xcorr is not giving me accurate results. Do we have any such technique which works in case of noisy delays as well and gives us accurate delay?
I'm adding my code here as well.
clear; close all; [x, fs] = audioread('testing_voice.wav'); delay1 = 25; %generating white noise equal to the length of delay mu=0; sigma=2; X=sigma*randn(delay1,1)+mu; x = x(1:5760); x1 = [X;x]; x1 = x1(1:5760); [r,b] = xcorr(x1,x, 'normalized'); [~, index] = max(abs((r))); delay = b(index);
delay = b(index) return us the total delay in signal.