# Is magnitude information enough to reconstruct an audio signal

I have used an MMSE STSA estimator to obtain the magnitude of an audio signal. The original signal is combined with white noise and I used an algorithm given in an old research paper by Ephraim and Malah to estimate the amplitude of the clean signal. Now I just have the magnitude information and I don't have the phase. The question is: is this enough to reconstruct an audio signal using ifft. If not can I use any arbitrary phase like the white noise phase? Please let me know

• It's impossible to reconstruct the signal using only the spectrum magnitude. However, if you are going to evaluate the result acoustically (by hearing it), then it may not matter. There is some disagreement on the details, but for most common audio signals, the human ear is insensitive to changes in phase.
– MBaz
Nov 26, 2014 at 1:38
• human hearing may be insensitive to a constant (w.r.t. time) offset of phase but we can hear changing phase in time. changing phase of a sinusoid offsets or detunes the frequency of that sinusoid. also, even a static offset of phase can be heard in extreme situations, like an all-pass filter with a long delay element in side. that does not change magnitude (because it's an APF), but if the delay is long enough (and the APF feedback coefficient large enough), the output will sound echoey or reverberant compared to the input. i think the simple answer to the OP is "no". Nov 26, 2014 at 1:49
• @robertbristow-johnson, yes, I know that we can hear certain phase offsets on certain signals. However, the consensus seems to be that in the case of audio signals such as music, or even voice, and not overly extreme or time-varying phase offsets, they're basically undetectable.
– MBaz
Nov 26, 2014 at 16:26
• @MBaz The human ear is definitely sensitive to completely removing the phase of a signal. Instead of a song, you'll just have a loud pop. Nov 29, 2014 at 0:36
• @endolith I tried it with a voice signal. I didn't get a loud pop; after removing a large peak at the signal's end, I got what sounds like a crowded room. I wasn't aware of this; thanks for pointing it out.
– MBaz
Nov 29, 2014 at 22:58

What you have to do is use the phase of the original noisy speech signal, i.e. only the magnitudes are improved by gain factors computed according to some optimality criterion (MMSE in this case). So the speech signal is reconstructed from the (hopefully) improved magnitude and the original phase. Why this works has already been explained in the comments (the main argument is usually that the human ear is insensitive to changes to the original phase, as long as they are not time-varying).

• Thank you very much for your reply... In my case (MMSE), I think the paper used the phase of the noisy signal with the amplitude generated by the MMSE algorithm. I will try to do that and see what happens... Thanks again
– Mona
Nov 27, 2014 at 4:31
• @Mona: For sure, you need to use the phase of the noisy signal, as is done in the paper, and in all other related denoising methods. Nov 27, 2014 at 7:30
• Thank you for your comments... I was going to try without and without phase info. Now, i am convinced that I need the phase of the original noisy speech. BTW, there are some research papers doing an estimation of the phase, but I will look at them after I try the phase of noisy signal. Thanks again
– Mona
Nov 27, 2014 at 12:22

Here is a MATLAB experiment for phase:

[x Fs Nbit]= wavread('test.wav',1024*100); % Get a piece of song ;)
x = x(:,1); % Get a single channel
Y = abs(fft(x)); % Take FFT of the entire piece at once!
y = real(ifft(Y)); % Throw away all-phase information and reconstruct y

y2 = zeros(1,length(x)); % NOW: we will process in BLOCKS!
for i=1:1024:100*1024 % get a block, take its fft, reconstruct a block from fft magnitude
y2(i:i+1023) = real(ifft(abs(fft(x(i:i+1023)))));
end

figure,plot(x); % piece of a song
figure,plot(y); % obtained from IFFT of MAGNITUDE only of complete piece
figure,plot(y2);% obtained from IFFT of MAGNITUDE only of 1024 sample BLOCKS

sound(x,Fs,Nbit); % the original
sound(y,Fs,Nbit); % from single piece, this is garbage!
sound(y2,Fs,Nbit); % block based, robotic but inteligible!