I have two .wav audio(stereo) files to be compared. The files may vary in frequency or amplitude or phase shift. How to compute the difference between the wave files in Scilab? The expected output is that if frequency and amplitude differ between the audio files, the output must return that they are dissimilar. Phase changes need not be compared.
$\begingroup$
$\endgroup$
6
-
3$\begingroup$ Question seems very broad. what is the parameter you want to compare - frequencies, amplitudes, phase, etc. ? $\endgroup$– Arpit JainJul 24, 2017 at 11:37
-
$\begingroup$ The expected output is that if frequency and amplitude differ between the audio files, the output must return that they are dissimilar. $\endgroup$– SanjayaJul 24, 2017 at 11:52
-
$\begingroup$ Even if phase changes are found between the audio files, it should not be considered. i.e) the output must return that they are similar $\endgroup$– SanjayaJul 24, 2017 at 11:54
-
1$\begingroup$ Spectrogram could be used for this application. $\endgroup$– Arpit JainJul 24, 2017 at 13:04
-
2$\begingroup$ Please edit your question to add this new information. $\endgroup$– Peter K. ♦Jul 24, 2017 at 13:51
|
Show 1 more comment
2 Answers
$\begingroup$
$\endgroup$
2
Short Time Fourier Transform can be used for comparing the frequency and amplitude differences between two audio files. it can be implemented using basic windowing of audio followed by DFT operation over the windowed audio.
-
$\begingroup$ Could you please give me a sample code for the concept mentioned $\endgroup$– SanjayaJul 25, 2017 at 3:36
-
$\begingroup$ you can find implementations on web following might help - dsprelated.com/freebooks/sasp/Short_Time_Fourier_Transform.html iitg.vlab.co.in/?sub=59&brch=164&sim=908&cnt=2 and if this answer is fine you can accept it . $\endgroup$ Jul 25, 2017 at 5:31
$\begingroup$
$\endgroup$
Signal similarities can be found using the DTW algorithm. Then, you can follow the alignment path and check for phase changes in a localized/window perspective.