whether i just nest them (iff(fft(audio))
) or try window-by-window (window
the audio, do the fft
, do the ifft
, then invert the window, replacing zero with eps, then merge the samples back (trying abs
here and there in the pipelines)) i get only noise.
i know the ifft
is only inverse to the fft
with infinite precision arithmetic, infinitely many samples, etc (right?) i'm working with 64bit floating point and 44kHZ sample rate. but, i would expect to be able to at least hear the original audio.
is my error practical or theoretical? i can give code, if it's a bug.
Building on JoeKington's comment, I have downloaded this file, and tried the following
And the resulting file plays exactly the same as the original one.
So turning the return complex values into reals is only half the problem (and you may want to go with
np.abs
rather thandata.real
, as the code above implicitly does), and you then also need to recast your floating point numbers touint
s of the apropriate bit-depth.