Overall what I need to do is fft two wav files, convolve them, and then inverse fft (to find the time stamps of one sound in a larger, noiser wav file.
I have the fft of two wav files thanks to bunkus at Python Scipy FFT wav files
Having used this code, how would I convolve two wav files given the frequency and amplitude arrays of each? If I used numpy.convolve
would the two inputs be the frequency array of each wav file? The amplitude array? What about scipy.signal.fftconvolve()
?
I need to output the convolution in a format such that it can then be passed into np.fft.ifft() on this convolution.
numpy.convolve
orscipy.signal.fftconvolve
on the data before applying the FFT, or apply the FFT, multiply the two results, then IFFT. However, to find the one signal in the other, you should not use convolution, but the cross correlation. This requires flipping the "model" signal before applying the convolution. – Cris Luengo Sep 3 at 14:30