So, I worked with FFT, and I'm currently trying to get the sound form from a file with FFT (eventually modify it), but then it outputs the modified signal back to the file. I received an FFT sound wave, and then used the inverse FFT function on it, but the output file does not sound correctly. I did not do any filtering according to the waveform - I just test the receipt of frequency data, and then return it back to the file - it should sound the same, but it sounds completely different. Any ideas?
- EDIT -
Since then, I have worked a little on this project, but have not yet received the desired results. The issued sound file is noisy (both louder and additional noise absent from the source file), and sound from one channel leaked to another channel (which was previously quiet). The input audio file is a stereo 2-channel file with sound coming from only one channel. Here is my code:
import scipy import wave import struct import numpy import pylab from scipy.io import wavfile rate, data = wavfile.read('./TriLeftChannel.wav') filtereddata = numpy.fft.rfft(data, axis=0) print (data) filteredwrite = numpy.fft.irfft(filtereddata, axis=0) print (filteredwrite) wavfile.write('TestFiltered.wav', rate, filteredwrite)
I do not quite understand why this does not work ...?
EDIT: I have archived the problem of the .py file and audio file if this helps solve the problem here .
source share