Forums

spectral subtraction of signals other than noise

Started by adj June 16, 2005
i have been reading a lot of messages on spectral subtraction and how
it is useful in reducing background noise. i have tried this in matlab
and i was  highly successful in attenuating the noise from a sound
file. but when i tried this with another sound file instead of noise
the signal was not attenuated at all. in fact  both of the signals
could be heard perfectly well; and i can say pretty positively without
any degradation in the secondary signal at all. i would like to know
whether this method of spectral subtraction is applicable for other
signals too other than noise. if yes than how; what extra processing of
the signal is required. if no then why so. if someone can shed light on
this problem i would be really thankful to you. thank you

"adj" <arshdeepjindal@gmail.com> writes:

> i have been reading a lot of messages on spectral subtraction and how > it is useful in reducing background noise. i have tried this in matlab > and i was highly successful in attenuating the noise from a sound > file. but when i tried this with another sound file instead of noise > the signal was not attenuated at all. in fact both of the signals > could be heard perfectly well; and i can say pretty positively without > any degradation in the secondary signal at all. i would like to know > whether this method of spectral subtraction is applicable for other > signals too other than noise. if yes than how; what extra processing of > the signal is required. if no then why so. if someone can shed light on > this problem i would be really thankful to you. thank you
So if you've implemented it in matlab then you must have had an estimate of the noise signal for the case when it worked? Or was this provided to you? What did you use for the second case? Do you think your noise estimate in the second case was a good estimate of the true noise? What were the relative powers at different frequencies of the two sigals in both cases? Tony
<tony.nospam@nospam.tonyRobinson.com> wrote in message
news:877jgu3vha.fsf@tonyRobinson.com...
> "adj" <arshdeepjindal@gmail.com> writes: > > > i have been reading a lot of messages on spectral subtraction and how > > it is useful in reducing background noise. i have tried this in matlab > > and i was highly successful in attenuating the noise from a sound > > file. but when i tried this with another sound file instead of noise > > the signal was not attenuated at all. in fact both of the signals > > could be heard perfectly well; and i can say pretty positively without > > any degradation in the secondary signal at all. i would like to know > > whether this method of spectral subtraction is applicable for other > > signals too other than noise. if yes than how; what extra processing of > > the signal is required. if no then why so. if someone can shed light on > > this problem i would be really thankful to you. thank you > > So if you've implemented it in matlab then you must have had an estimate > of the noise signal for the case when it worked? Or was this provided > to you? What did you use for the second case? Do you think your noise > estimate in the second case was a good estimate of the true noise? What > were the relative powers at different frequencies of the two sigals in > both cases? > > > Tony >
It wont work if the noise is rapidly non-stationary like two speakers - also you need a good voice activity detector and thats hard to find for some applications. Rimmer
for the first case i assumed the noise to be additive and uncorrelated.
also i assumed that it affected the speech signal over the entire
spectrum uniformely. this assumption is pretty much valid for most
experimental testing. if an estimate if the noise signal had been
provided to me i would have used multi band spectral subtraction. but i
believe that would have only been a very slight improvement over the
present results.


adj wrote:
> i have been reading a lot of messages on spectral subtraction and how > it is useful in reducing background noise. i have tried this in matlab > and i was highly successful in attenuating the noise from a sound > file.
Exactly how did you do this? Was there already noise in the data that you subtracted? Did you generate noise, add it to the sound file, and then subtract it again?
> but when i tried this with another sound file instead of noise > the signal was not attenuated at all. in fact both of the signals > could be heard perfectly well; and i can say pretty positively without > any degradation in the secondary signal at all. i would like to know > whether this method of spectral subtraction is applicable for other > signals too other than noise.
You have got a couple of steps ahead of me: I would like to start with establishing that the technique can be used at all. The problem is that noise is only known in terms of its power spectrum. The phase information is not available, so the exact shape of the noise is not known in time domain. So if you have a noise signal that has amplitude n(t) at time = t, you could as well subtract an amplitude of -n(t), giving a total of 2(t) contribution from the noise.
> if yes than how; what extra processing of > the signal is required. if no then why so.
Waveforms tend to vary too much. Even if the free-space envelope of a radar signal is known and recieved undegraded, the exact waveform of the radar signal can not be known, since it depends on the total travelled distance of the pulse. Again, phase information is the culprit.
> if someone can shed light on > this problem i would be really thankful to you. thank you
It's all about finding robust ways of dealing with data outside computer simulations. Rune
yes there was noise in the data already

hi rune. since you've mentioned phase information i have a question
regarding that. i took the fft of a sound file. to its phase part i
added a random phase. and for the magnitude part i subtracted the
magnitude of the spectrum of noise which in magnitude was very less
compared to the original sound. i then reconstructed the sound file
thus edited by taking ifft. all this processing was done in matlab. now
after taking ifft i was expecting a real signal which i should ideally
get. but i am getting a complex signal. please explain this
irregularity to me. thanks

adj wrote:
> hi rune. since you've mentioned phase information i have a question > regarding that. i took the fft of a sound file. to its phase part i > added a random phase. and for the magnitude part i subtracted the > magnitude of the spectrum of noise which in magnitude was very less > compared to the original sound. i then reconstructed the sound file > thus edited by taking ifft. all this processing was done in matlab.
It beats me how you were "highly successful" at noise reduction using this method.
> now > after taking ifft i was expecting a real signal which i should ideally > get. but i am getting a complex signal. please explain this > irregularity to me. thanks
You destroyed the conjugate complex symmetry of the real input signal in frequency domain when you added the random phase noise, resulting in a complex output sequence. You should try to find some literature on how noise reduction via spectral subtraction works (what you describe is more or less the opposite of noise reduction), and why it usually doesn't work well. Regads, Andor
i'm sorry for the confusion. my last post about phase addition was not
about noise reduction. it was something which i had tried differently.
i have read in literature that eeven if we add a random phase to the
fft of a signal, if the original was real so will the ifft of the
new(phase added) signal be. i am not observing this. this was my
question. please don not confuse it with the spectral subtraction and
noise reduction part. i know the choice of post could have been in a
new topic.


adj wrote:
> hi rune. since you've mentioned phase information i have a question > regarding that. i took the fft of a sound file. to its phase part i > added a random phase.
Which is equivalent to adding noise.
> and for the magnitude part i subtracted the > magnitude of the spectrum of noise which in magnitude was very less > compared to the original sound.
How do you know you subtracted only noise? Do you have refernce data to verify the noise spectrum?
> i then reconstructed the sound file > thus edited by taking ifft. all this processing was done in matlab. now > after taking ifft i was expecting a real signal which i should ideally > get. but i am getting a complex signal. please explain this > irregularity to me. thanks
Andor has already provided one answer. The other answer is that any output of the IFFT is complex-valued, even if it represents a real-valued signal. Try xx=ifft(fft(x)); for some real-valued vector x. Check out the magnitude of the imaginary component. If you did the transform correctly, the magnitudes ought to be on the order << 1e-12. Now try xxx=real(ifft(fft(x))); and see the difference. Rune