I am doing comparison between two wave files, How to calculate phase difference between those files? Second wave is generated by making some changes in the first one .I have tried calculating phase like this:-
y, sr = librosa.load('first.wav') D = librosa.stft(y) magnitude, phase1 = librosa.magphase(D) y1, sr1 = librosa.load('second.wav') D1 = librosa.stft(y1) magnitude1, phase2 = librosa.magphase(D1)
then calculated the difference as
Is this the correct way??