Dear all, I'm trying to do signal enhancement for a hands free voip communication system. I'm trying to subtract noise from the microphone signal. My problem is that i can do this nicely on the spectrum obtained by an FFT spectrum: for( int i = 0 ; i < size ; i++ ) spectrum[i] = (Math.sqrt(real[i] * real[i] + imag[i] * imag[i])); // dataLen; I can simply subtract the estimated noise signal from the obtained spectrum after FFT, however this seems to be of no use, since i cannot use the spectrum to get the signal back. Therefore i need to modify the real and imag parts of the FFT before doing the IFFT. This however is way more complicated than changing the spectrum. The real and imaginary parts can be positive and negative due to phase changes between the input signal and the forseen noise. Is there a way to go back from the spectrum to the signal or a way to overcome the phase change and estimate the real and imag part of the noise independant of phase change? I'm no audio expert and have little experience in this field, so please try to keep the answers as simple as possible ;-). Thanks in advance.
Noise reduction on speech signal using FFT
Started by ●July 5, 2011
Reply by ●July 5, 20112011-07-05
"Is there a way to go back from the spectrum to the signal" Inverse FFT. Without more knowledge of your actual application, it is impossible to tell whether this is the proper means for denoising your signal in the first place. Mark
Reply by ●July 5, 20112011-07-05
On Jul 5, 6:18=A0am, "basgoossen" <bas@n_o_s_p_a_m.2dive.nl> wrote:> Dear all, > > I'm trying to do signal enhancement for a hands free voip communication > system. I'm trying to subtract noise from the microphone signal. My probl=em> is that i can do this nicely on the spectrum obtained by an FFT > > spectrum: > for( int i =3D 0 ; i < size ; i++ ) > spectrum[i] =3D (Math.sqrt(real[i] * real[i] + imag[i] * imag[i])); // > dataLen; > > I can simply subtract the estimated noise signal from the obtained spectr=um> after FFT, however this seems to be of no use, since i cannot use the > spectrum to get the signal back. Therefore i need to modify the real and > imag parts of the FFT before doing the IFFT. This however is way more > complicated than changing the spectrum. The real and imaginary parts can =be> positive and negative due to phase changes between the input signal and t=he> forseen noise. > > Is there a way to go back from the spectrum to the signal or a way to > overcome the phase change and estimate the real and imag part of the nois=e> independant of phase change? > > I'm no audio expert and have little experience in this field, so please t=ry> to keep the answers as simple as possible ;-). > > Thanks in advance.what is the frequency of the noise that you are removing? Most likely you are removing signal too, so the answer is you cannot get the original signal.
Reply by ●July 5, 20112011-07-05
On Jul 5, 8:10=A0am, "taks" <mtakatz@n_o_s_p_a_m.verasent.com> wrote:> "Is there a way to go back from the spectrum to the signal" > > Inverse FFT. >Note the operation spectrum[i] =3D (Math.sqrt(real[i] * real[i] + imag[i] * imag[i])); // real[i] and imag[i] are the real and imaginary components of the FFT. Once this operation is performed, information is lost, and IFFT will not work. Since Basgoossen is working with speech signals, the noise is probably spread over the desired frequencies.
Reply by ●July 5, 20112011-07-05
On Jul 5, 10:18=A0pm, "basgoossen" <bas@n_o_s_p_a_m.2dive.nl> wrote:> Dear all, > > I'm trying to do signal enhancement for a hands free voip communication > system. I'm trying to subtract noise from the microphone signal. My probl=em> is that i can do this nicely on the spectrum obtained by an FFT > > spectrum: > for( int i =3D 0 ; i < size ; i++ ) > spectrum[i] =3D (Math.sqrt(real[i] * real[i] + imag[i] * imag[i])); // > dataLen; > > I can simply subtract the estimated noise signal from the obtained spectr=um> after FFT, however this seems to be of no use, since i cannot use the > spectrum to get the signal back. Therefore i need to modify the real and > imag parts of the FFT before doing the IFFT. This however is way more > complicated than changing the spectrum. The real and imaginary parts can =be> positive and negative due to phase changes between the input signal and t=he> forseen noise. > > Is there a way to go back from the spectrum to the signal or a way to > overcome the phase change and estimate the real and imag part of the nois=e> independant of phase change? > > I'm no audio expert and have little experience in this field, so please t=ry> to keep the answers as simple as possible ;-). > > Thanks in advance.I believe they just stract the magnitude and re-insert the original phase!
Reply by ●July 5, 20112011-07-05
On Tue, 05 Jul 2011 05:18:19 -0500, "basgoossen" <bas@n_o_s_p_a_m.2dive.nl> wrote: [snipped by Lyons]> >I'm no audio expert and have little experience in this field, so please try >to keep the answers as simple as possible ;-). > >Thanks in advance.Hello basgoossen, It seems like you're thinking about performing what I call "frequency-domain filtering." If you have little or no experience in the field of DSP then you'll need more help than we can provide here on comp.dsp. You seem to be saying something like, "I want to build a two-story wood house. But I have no experience using a hammer or a circular saw. What can I do? Please keep the answers simple." Actually basgoossen, I have a question. Is this filtering project a hobby of yours, or is it part of your work for which you are being paid? Good Luck, [-Rick-]
Reply by ●July 5, 20112011-07-05
Rick is completely right in what he is saying, but on the other hand we are cooperative in this newsgroup. So search for: - Overlap add filterbank or overlap save filterbank - Ephraim/Malah MMSE/STSA noise reduction or you can also go with Wiener Filter or some Spectral substraction - For noise modelling/estimation Rainer Martin did a nice work, search for him Good luck, now it's up to you. mb
Reply by ●July 6, 20112011-07-06
> >Rick is completely right in what he is saying, >but on the other hand we are cooperative in this newsgroup. > >So search for: >- Overlap add filterbank or overlap save filterbank >- Ephraim/Malah MMSE/STSA noise reduction or you can also go with Wiener >Filter or some Spectral substraction >- For noise modelling/estimation Rainer Martin did a nice work, searchfor>him > > >Good luck, now it's up to you. > >mb >Thanks for the answers, so far i have come a long way with the wood house ;-) and think i can push it some what more. The bases of what i am doing is echo cancellation in the frequency domain. Which is obviously the same as noise cancellation once you can estimate the echo signal. I can already filter out the echoing bands but by doing this i loose quite some of the signal from which the echo is removed. I'm willing to do some research in this field so the information of mb is really helpfull. Thanks for that. I think i have to pay more attention to the phases of the signal then i do now in order to be successfull in fullfilling this task. How sensitive is the human ear btw to phase changes in a mono signal, i know in a stereo signal you can change the perceived location of the signal. But what whould be the perceived difference of a mono signal f(x) = sin(x*0.1) + sin(x*0.03) and f(x) = sin(x*0.1) + cos(x*0.03) I also did a IFFT of the spectrum but this indeed gives a very bad distorted signal. IFFT of the whole bunch works very good, even with brick wall filters (Except when there are strong signals on the edges of the filter, there i need filter smoothing) now thanks to the overlap-save methods.
Reply by ●July 6, 20112011-07-06
I think you are barking up the wrong tree. Echo cancellation should not involve filtering out echo frequencies. The (adaptive) filter generates an estimate of what the echo would be. The system injects the negative of that to cancel the echo (and only the echo). Sidetone suppression in a wired telephone and bidirectional telephone amplifiers illustrate how that works. That stuff is over a hundred years old. Not much is really new. Jerry -- Engineering is the art of making what you want from things you can get.
Reply by ●July 6, 20112011-07-06
On Jul 6, 2:50=A0am, "basgoossen" <bas@n_o_s_p_a_m.2dive.nl> wrote:> >Rick is completely right in what he is saying, > >but on the other hand we are cooperative in this newsgroup. > > >So search for: > >- Overlap add filterbank or overlap save filterbank > >- Ephraim/Malah MMSE/STSA noise reduction or you can also go with Wiener > >Filter or some Spectral substraction > >- For noise modelling/estimation Rainer Martin did a nice work, search > for > >him > > >Good luck, now it's up to you. > > >mb > > Thanks for the answers, so far i have come a long way with the wood house > ;-) and think i can push it some what more. The bases of what i am doing =is> echo cancellation in the frequency domain. Which is obviously the same as > noise cancellation once you can estimate the echo signal. I can already > filter out the echoing bands but by doing this i loose quite some of the > signal from which the echo is removed. > > I'm willing to do some research in this field so the information of mb is > really helpfull. Thanks for that. I think i have to pay more attention to > the phases of the signal then i do now in order to be successfull in > fullfilling this task. How sensitive is the human ear btw to phase change=s> in a mono signal, i know in a stereo signal you can change the perceived > location of the signal. But what whould be the perceived difference of a > mono signal f(x) =3D sin(x*0.1) + sin(x*0.03) and f(x) =3D sin(x*0.1) + > cos(x*0.03) > > I also did a IFFT of the spectrum but this indeed gives a very bad > distorted signal. IFFT of the whole bunch works very good, even with bric=k> wall filters (Except when there are strong signals on the edges of the > filter, there i need filter smoothing) now thanks to the overlap-save > methods.- Hide quoted text - > > - Show quoted text -Basgoossen, I would never have guessed you were working on echo cancellation, based on your original description and question. Echo cancellation is more than speech enhancement or noise reduction. In fact, some people perform noise reduction after echo cancellation. You will not be successful if you are merely trying to subtract the echo frequency spectrum. Maurice Givens






