Is there any way of retrieving phase information with only access to real part of successive FFT frames?

Due to a limitation of the WebAudio specification the FFT available in JavaScript only makes available the real part (1st half) of the calculated frequency data. Is there any way of recreating the phase information (and subsequently improving interpolation of peak frequencies) using the fluctuations in bin amplitude between frames?

• What is your objective with the processing? Having the phase information won't improve the frequency precision (if by that you mean the frequency bin values). Looking at the specs it seems the sample is windowed as well, then the frequency bin magnitudes are smoothed. – geometrikal Sep 9 '15 at 11:14
• blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft section 3 hints at being able to reconstruct true frequency of a peek using phase information. – norlesh Sep 9 '15 at 11:24
• also of the interpolation algorithms mentioned in dspguru.com/dsp/howtos/how-to-interpolate-fft-peak the most accurate one utilises both real and imaginary information. – norlesh Sep 9 '15 at 11:27
• Or maybe you can run the signal through a filter that rotates all phases by 90°, and compute another FFT on the rotated data... – Sebastian Reichelt Sep 9 '15 at 16:59
• webaudio isn't returning the real part of the complex transform, but the log magnitude of the transform. It's returning n/2 points because the other half is symmetric in magnitude (given the real-only audio input) and thus redundant. Thus there is no way to recover the phase. – hotpaw2 Sep 10 '15 at 19:56

webaudio isn't returning the real part of the complex FFT transform, but just the log magnitude of the FFT result. From just this result alone, of the fluctuations between the results of multiple frames, you can't retrieve the phase information.

However, if you can get at the input data and decompose this input vector into a symmetric vector plus an anti-symmetric vector, the magnitude of the FFT of the symmetric vector will be equivalent to scaled real components of the FFT of the original input vector, and the magnitude of the FFT of the anti-symmetric vector will be equal scaled imaginary components of the FFT of the original input vector. Thus, the decomposition plus 2 magnitude-only FFTs will allow you to determine both the magnitude and phase of the FFT components.

v_even = v + v_reversed
v_odd  = v - v_reversed

• Doh! it took me about 10 passes at reading the mathematics in the WebAudio FFT section before I finally found where the complex data is converted to magnitude during the smoothing... after a full FFT has been performed (GRRR!!!) – norlesh Sep 11 '15 at 12:29