I am having two .wav files, one is modulated wave that is made into a .wav file and another is a recieved .wav file which is recorded from microphone while playing first modulated .wav file. So now that I have two .wav files, one sent and one received. I am trying to synchronize the two files so that I can find the exact time instant where my received file gets in sync with sent file.
I am using, received_wave = thinkdsp.read_wave(filename = '.wav')
to read the wave from file and modulated_wave.write(filename = '.wav')
to write the wave into file. I am using Think DSP module in python for doing these.
So this received_wave
and modulated_wave
has two attributes ys
and ts
where ys
is amplitude and ts
is time stamps. I want to find the ts
such that both wave will synchronize.
for this right now iam using crosscorrealtion of modulated wave(with sync bits) and recieved wave(having both sync bits and data that iam sending such a way that start sync bits then data bits then again end sync bits) so when i crosscorrelate start sync modulated wave(modulated wave using start sync bits only)and recieved wave i can find the value in crosscorrelation matrix where it is almost equal to the auto correlation of sync_wave.
is this approach correct? or shud i check for maximum value of crosscorrelated matrix then find the index ?