Reply by August 15, 20052005-08-15
Some comments on this, coming from someone with some (but not much)
background in removing fan noise from speech recordings.

To remove stationary noise from speech, I mainly hear about three
approaches: 'spectral subtraction', 'Wiener filtering', and
'Ephraim-Malah'.   For spectral subtraction theory, I enjoyed the
article by McAulay and Malpass in IEEE Trans. on Acoustics, Speech and
Signal Processing (April 1980) and the article by Lee and Ching in the
ICSLP 2004 proceedings.  I believe M&M suggest operating on power
spectra (I mean, squared magnitudes) and L&C suggest operating on
linear spectra.  For Ephraim-Malah, journal papers from 1984-1985 were
online at http://ece.gmu.edu/~yephraim/ephraim.html last I checked.   I
don't know what the best place to start is to learn about Wiener
filtering in this context, but if you look through what's linked to at
http://www.ICSI.Berkeley.EDU/Speech/papers/gelbart ms/pointers you will
find some Wiener filter stuff as well as some stuff about other kinds
of noise reduction.

I am guessing that any of these three approaches (as well as various
others) will work as a starting point.  How well you tweak your
implementation may make more performance difference than which
theoretical approach you start with.  In the past, people have
struggled in the past with "musical noise" artifacts with noise
reduction by Wiener filtering and spectral subtraction, and evolved
some knowledge of tweaks to deal with them.  See for example:

Phil S. Whitehead, David V. Anderson, and Mark A. Clements, "Adaptive,
acoustic noise suppression for speech enhancement", ICME 2003
(www.imtc.gatech.edu/projects/technology/media/icme2003.pdf)

If I recall correctly, in

L. Arslan, A. McCree and V. Viswanathan, "New Methods for Adaptive
Noise Suppression", ICASSP 1995

the authors speculated the musical noise was caused by temporal
discontinuity in the noise suppression filter (in other words,
variations in the noise suppression filter from frame to frame).

Such discontinuity can be addressed by smoothing (low-pass filtering)
of the filter. I have access to the system described in

A. Adami, L. Burget, S. Dupont, H. Garudadri, F. Grezl, H. Hermansky,
P. Jain, S. Kajarekar, N. Morgan, and S. Sivadas "Qualcomm-ICSI-OGI
Features for ASR" ICSLP 2002

in which the Wiener filter used for noise reduction was smoothed across
both time and frequency and when I have listened to enhanced speech
from this I have never heard any musical noise.

In case you care, here are other papers that were recommended to me on
the topic of the musical noise problem:

Klaus Linhard and Heinz Klemm. Noise reduction with spectral
subtraction and median filtering for suppression of musical tones. In
Proc. of ESCA-NATO WOrkshop on Robust Speech Recognition for Unknown
Communication Channels, pages 159-162, Pont-a-Mousson, France, April
1997.

Cappe, O., "Elimination of the musical noise phenomenon with the
Ephraim and Malah noise Suppressor", IEEE Trans. on speech and audio
processing, Vol. 2, No. 2, pp345~349, April 1994.

Reply by Jon Harris August 12, 20052005-08-12
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message 
news:8cednSlPmbKYWWHfRVn-og@centurytel.net...
> > "Jon Harris" <jon99_harris7@hotmail.com> wrote in message > news:8ZTKe.28995$7d.6899@trnddc08... >> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message >> news:sNidnezpEIdsAWbfRVn-ow@centurytel.net... >>> >>> <jstout@ncon.com> wrote in message >>> news:1123776508.188773.199810@f14g2000cwb.googlegroups.com... >>>> My boss showed me a feature on some commercial software he wants me to >>>> incorporate into our system. >>>> >>> >>> This suggestion very much reflects *my* attitude and may not resonate with >>> everyone: >>> >>> There is no method that will remove broadband noise unless the noise in the >>> desired signal is identically the same as the noise to be subtracted. This >>> is pretty hard to do with broadband / random noise because any relative time >>> delays in the two noises causes them to add and not subtract. >> >> I would tend to disagree with this. Using frequency domain techniques, >> noise, even broadband "random" noise, can be removed to the signal within >> reason. There are often some artifacts that result, especially if the >> original SNR is low and you try to remove a lot of the noise. But within >> reason, this technique works quite well. > > Jon, > > Sorry if I wasn't clear. I meant in context: I didn't mean "filter", I meant > "subtract". In order to subtract broadband noise you have to have a real time > reference. I think I said that can be done.
OK, I just wanted to make sure you weren't saying that broadband noise can't be effectively reduced.
> So, yes a "frequency domain" method called bandstop filtering will work if the > signal is periodic and thus amenable to bandpass filtering to remove noise. > This is the classical case. In this case, a reference signal for the noise > isn't needed.
The spectral subtraction method described by others in this thread is better suited to remove broadband (constant spectrum) noise from a broadband signal. If either the noise or the signal is bandlimited, simple filtering can be effective.
Reply by Fred Marshall August 12, 20052005-08-12
"Jon Harris" <jon99_harris7@hotmail.com> wrote in message 
news:8ZTKe.28995$7d.6899@trnddc08...
> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:sNidnezpEIdsAWbfRVn-ow@centurytel.net... >> >> <jstout@ncon.com> wrote in message >> news:1123776508.188773.199810@f14g2000cwb.googlegroups.com... >>> My boss showed me a feature on some commercial software he wants me to >>> incorporate into our system. >>> >> >> This suggestion very much reflects *my* attitude and may not resonate >> with everyone: >> >> There is no method that will remove broadband noise unless the noise in >> the desired signal is identically the same as the noise to be subtracted. >> This is pretty hard to do with broadband / random noise because any >> relative time delays in the two noises causes them to add and not >> subtract. > > I would tend to disagree with this. Using frequency domain techniques, > noise, even broadband "random" noise, can be removed to the signal within > reason. There are often some artifacts that result, especially if the > original SNR is low and you try to remove a lot of the noise. But within > reason, this technique works quite well.
Jon, Sorry if I wasn't clear. I meant in context: I didn't mean "filter", I meant "subtract". In order to subtract broadband noise you have to have a real time reference. I think I said that can be done. So, yes a "frequency domain" method called bandstop filtering will work if the signal is periodic and thus amenable to bandpass filtering to remove noise. This is the classical case. In this case, a reference signal for the noise isn't needed. Fred
Reply by Fred Marshall August 12, 20052005-08-12
<jstout@ncon.com> wrote in message 
news:1123791303.274063.317290@g49g2000cwa.googlegroups.com...
[snip]

I know a little about adaptive LMS filters.  In fact one of the process
in our product will use an LMS filter for equilization.  The problem is
my boss saw a batch trained filter in some other software and wants
that feature for our product.  He wants to be able to grab a few
seconds of noise then tell the software, block noise that looks like
that. At this point it doesn't matter if it works well or not; he just
wants that feature.

The users of our system will get to decide if it works or not.

Jeff Stout

Jeff,

You can probably do that.  It would only work for periodic noises.

Fred


Reply by Ben Bradley August 12, 20052005-08-12
On 11 Aug 2005 09:08:28 -0700, jstout@ncon.com wrote:

>My boss showed me a feature on some commercial software he wants me to >incorporate into our system. > >Basically, you show the software a patch of noise (samples w/o the >signal). Later, the program lets you subtracts that noise from a >signal contaminated by that same noise. IOW, subtract the fan noise >from the voice acquired from a microphone sitting next to a fan.
This feature is in most (all?) audio/.wav file editor programs, from earlier Goldwave and Cool Edit versions to the present. The open-source editor Audacity has it (there are limitations on how you can use the source code, read the licenses and whatnot): http://audacity.sourceforge.net/about/features The second line under "Effects" says "Remove static, hiss, hum, or other constant background noises." The keyword for good results is constant. Noise that varies in volume is much harder than a constant noise, hum or buzz. Specifically, a fan produces noise that varies enough in volume from moment to moment that it's rather diffucult to undo. Electronic noise from a mic preamp (or zener diode) and tape hiss are both very 'good', constant sources of noise, and this method does remarkably well with substantially reducing them. Furthermore, any recording that has gone through compression or automatic volume/level control after the noise is added will be very diffucult, because now the noise level is always changing. If you can 'undo' the compression, the noise reduction then might work better, but undoing compression is rather diffucult.
>Also, I'm not sure if that is the correct method to use. I've been >reading a lot about LPC (linear predictive coding), MEM (maximum >entropy method), and also something else call spectra subtraction. >Could either of these method be a better way to remove the noise from >my signal?
Spectral subtraction is the method universally used for constant noise. There are also other methods specifically for for other kinds of noises, such as the pops and clicks from vinyl LP's, or the constant 'bacon frying' crackles of earlier 78RPM records. These are two separate things, and are called declicking and decrackling, respectively.
>Anyway, could somebody give me some hints about the correct way to >remove such identified noise from a signal contaminate by that noise?
Take a section of the recording with just the noise, and take an FFT of this. Each FFT bin tells how much noise is in that frequency range. Then you take a sliding FFT over the whole recording: FFT a short section of the recording, then subtract the bin values of the noise-only FFT, then do an IFFT to recreate the time values with the noise removed. Get an audio editor and play around with it. You'll be able to create and hear all the artifacts related to this effect. At full reduction and on a signal with a lot of noise there's a strong 'underwater' sound or swishing effect added to the denoised sound, similar to badly-encoded or low bitrate mp3's (it's the diddling with the spectrum with FFT's that causes it). So it's actually a tradeoff between doing less noise reduction and creating these artifacts.
> >Thanks in advance, >Jeff Stout
----- http://www.mindspring.com/~benbradley
Reply by Matt Timmermans August 12, 20052005-08-12
<jstout@ncon.com> wrote in message 
news:1123776508.188773.199810@f14g2000cwb.googlegroups.com...
> Anyway, could somebody give me some hints about the correct way to > remove such identified noise from a signal contaminate by that noise?
Sure -- the magic Google words are "spectral subtraction". Basically, you just reduce the magnitude of frequency components in windowed blocks of the signal, to subtract the estimated noise spectrum. The longer your blocks are, the better it works. -- Matt
Reply by Jon Harris August 11, 20052005-08-11
<jstout@ncon.com> wrote in message 
news:1123776508.188773.199810@f14g2000cwb.googlegroups.com...
> My boss showed me a feature on some commercial software he wants me to > incorporate into our system. > > Basically, you show the software a patch of noise (samples w/o the > signal). Later, the program lets you subtracts that noise from a > signal contaminated by that same noise. IOW, subtract the fan noise > from the voice acquired from a microphone sitting next to a fan. > > I'm not sure how this is done. But I think I can (re)create the system > by taking the batch of noise acquire and putting it in the form of the > "Weiner-Hopf" equation. > > C_k[x]**xy = Sigma(h_j * C_k-j ** xx, j = 0..M) > > where C**xy is the cross-correlation between x&y, and C**xx is the > autocorrelation of x. > > Then inverting the matix by the "Levinson-Durbin" method and using the > results to construct an FIR filter. But I'm also a little fuzzy about > the FIR filter part. I keep reading about the "reflection > coefficients" which is really confusing me. Is the output of the LD > method (h_j) just the constants of the an FIR filter? > > Also, I'm not sure if that is the correct method to use. I've been > reading a lot about LPC (linear predictive coding), MEM (maximum > entropy method), and also something else call spectra subtraction. > Could either of these method be a better way to remove the noise from > my signal? > > Anyway, could somebody give me some hints about the correct way to > remove such identified noise from a signal contaminate by that noise?
If you are interested in a "buy" instead of "build" approach, you might consider http://www.dspalgorithms.com/products/nr.html.
Reply by Jon Harris August 11, 20052005-08-11
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message 
news:sNidnezpEIdsAWbfRVn-ow@centurytel.net...
> > <jstout@ncon.com> wrote in message > news:1123776508.188773.199810@f14g2000cwb.googlegroups.com... >> My boss showed me a feature on some commercial software he wants me to >> incorporate into our system. >> > > This suggestion very much reflects *my* attitude and may not resonate with > everyone: > > There is no method that will remove broadband noise unless the noise in the > desired signal is identically the same as the noise to be subtracted. This is > pretty hard to do with broadband / random noise because any relative time > delays in the two noises causes them to add and not subtract.
I would tend to disagree with this. Using frequency domain techniques, noise, even broadband "random" noise, can be removed to the signal within reason. There are often some artifacts that result, especially if the original SNR is low and you try to remove a lot of the noise. But within reason, this technique works quite well.
Reply by Jerry Avins August 11, 20052005-08-11
jstout@ncon.com wrote:
> [snip] > > >>If the desired signal is mostly periodic and the noise is broadband, then >>you can filter out all the other frequencies and reduce the random noise in >>the signal. >> >> >> +--------------------+ >> | | >> | | >> | | >> input------+------------------&#4294967295;---|------------>(+)----+----> e[n] >> | | ^ >> | | | >> | +-----------+ v | >> +---| Delay |-->[LMS]------------+--------&#4294967295;--> o[n] >> +-----------+ >> >> >> Adaptive enhancer >> >> >> LMS adaptive filter adjusts to minimize e[n] which cancels signal >> >> >> o[n] ideally contains only signal >> >> >>Once you have these fundamentals well in mind then you can decide how to >>best implement including whatever is in the block labeled LMS >> >> >>Fred > > > I know a little about adaptive LMS filters. In fact one of the process > in our product will use an LMS filter for equilization. The problem is > my boss saw a batch trained filter in some other software and wants > that feature for our product. He wants to be able to grab a few > seconds of noise then tell the software, block noise that looks like > that. At this point it doesn't matter if it works well or not; he just > wants that feature. > > The users of our system will get to decide if it works or not.
For a first cut, determine the amplitude spectrum of the noise (A=sqrt(Re^2+Im^2) ignoring phase, Replace the magnitude of each component with the difference between it and the largest one, and do a real-valued IFFT. Use the resulting samples as the coefficients of an FIR. It will attenuate most where the noise is strongest, and least where the noise is weak. There are some signals it won't mess up too badly. Is a consultant in order? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by August 11, 20052005-08-11
[snip]

>If the desired signal is mostly periodic and the noise is broadband, then >you can filter out all the other frequencies and reduce the random noise in >the signal. > > > +--------------------+ > | | > | | > | | > input------+------------------=AD---|------------>(+)----+----> e[n] > | | ^ > | | | > | +-----------+ v | > +---| Delay |-->[LMS]------------+--------=AD--> o[n] > +-----------+ > > > Adaptive enhancer > > > LMS adaptive filter adjusts to minimize e[n] which cancels signal > > > o[n] ideally contains only signal > > >Once you have these fundamentals well in mind then you can decide how to >best implement including whatever is in the block labeled LMS > > >Fred
I know a little about adaptive LMS filters. In fact one of the process in our product will use an LMS filter for equilization. The problem is my boss saw a batch trained filter in some other software and wants that feature for our product. He wants to be able to grab a few seconds of noise then tell the software, block noise that looks like that. At this point it doesn't matter if it works well or not; he just wants that feature. The users of our system will get to decide if it works or not. Jeff Stout