DSPRelated.com
Forums

AUDIO BROADBAND NOISE DETECTION WITH ADAPTIVE FILTER

Started by rickowens March 15, 2016
Hello! In order to quantify the broadband noise of an audio track, how
about implementing an adaptive filter? Does anyone know how can I proceed
(matlab or c ++)? I've seen lots of things around and it seems the only
viable option to estimate the broadband noise.

Thank you in advance.
---------------------------------------
Posted through http://www.DSPRelated.com
On Tue, 15 Mar 2016 06:39:12 -0500, rickowens wrote:

> Hello! In order to quantify the broadband noise of an audio track, how > about implementing an adaptive filter? Does anyone know how can I > proceed (matlab or c ++)? I've seen lots of things around and it seems > the only viable option to estimate the broadband noise.
"Adaptive" does not equal "magic". What characteristics distinguish the desired audio from broadband noise? Will your method work if the audio track is of rain falling on water, or a particularly rambunctious thrash metal song? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
>On Tue, 15 Mar 2016 06:39:12 -0500, rickowens wrote: > >> Hello! In order to quantify the broadband noise of an audio track, how >> about implementing an adaptive filter? Does anyone know how can I >> proceed (matlab or c ++)? I've seen lots of things around and it seems >> the only viable option to estimate the broadband noise. > >"Adaptive" does not equal "magic". What characteristics distinguish the
>desired audio from broadband noise? Will your method work if the audio >track is of rain falling on water, or a particularly rambunctious thrash
>metal song? > >-- > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com
Sorry for the late reply but I was unable to answer due to a problem here in the forum. My "goal" is to try to recognize and quantify the typical HISS of amateur audio recordings. Of course, one of the problems I encountered, estimating the variance of yule walker of some rock-metal pieces is that I get a false result. Now to solve this problem I thought about the adaptive filters. The only thing is that my only known input is my x signal (signal + noise), but I don't know the original signal. Does anyone know if there is a method for adaptive filters that allows the estimation of the error of the noise power without knowing the noise and/or the signal of the original clean track? Or is there some other more efficient way to get what I want? Thank you. --------------------------------------- Posted through http://www.DSPRelated.com
"rickowens" <110888@DSPRelated> writes:

>>On Tue, 15 Mar 2016 06:39:12 -0500, rickowens wrote: >> >>> Hello! In order to quantify the broadband noise of an audio track, how >>> about implementing an adaptive filter? Does anyone know how can I >>> proceed (matlab or c ++)? I've seen lots of things around and it seems >>> the only viable option to estimate the broadband noise. >> >>"Adaptive" does not equal "magic". What characteristics distinguish the > >>desired audio from broadband noise? Will your method work if the audio >>track is of rain falling on water, or a particularly rambunctious thrash > >>metal song? >> >>-- >> >>Tim Wescott >>Wescott Design Services >>http://www.wescottdesign.com > > Sorry for the late reply but I was unable to answer due to a problem here > in the forum. > > My "goal" is to try to recognize and quantify the typical HISS of amateur > audio recordings. Of course, one of the problems I encountered, estimating > the variance of yule walker of some rock-metal pieces is that I get a > false result. > > Now to solve this problem I thought about the adaptive filters. The only > thing is that my only known input is my x signal (signal + noise), but I > don't know the original signal. > > Does anyone know if there is a method for adaptive filters that allows the > estimation of the error of the noise power without knowing the noise > and/or the signal of the original clean track? > > Or is there some other more efficient way to get what I want? > > Thank you.
Hi Rick, Your requirements sound a lot like a "voice activity detector" (VAD) (though I realize it's not voice). You might google for those and see if you get some ideas. -- Randy Yates, DSP/Embedded Firmware Developer Digital Signal Labs http://www.digitalsignallabs.com
>Your requirements sound a lot like a "voice activity detector" (VAD) >(though I realize it's not voice). You might google for those and see if >you get some ideas. >-- >Randy Yates, DSP/Embedded Firmware Developer >Digital Signal Labs >http://www.digitalsignallabs.com
I had a look at it. The only thing is that I don't work offline, I don't think that I have to do real time speech recognition.. I have some tracks, some suffering from broadband noise or hiss, and some clean tracks. I wish I could say in some way if the song is good or not, based on how much hiss there is in the song. Do you think this is impossible to do? Whereas some genres are filled with white noise.. --------------------------------------- Posted through http://www.DSPRelated.com
Does anyone know if it's something I can do or if I'm wasting my time? :D

I repeat my problem.. I want to classify n wav tracks based on the amount
of broadband noise present in each track.

I hope someone can help me, thank you.
---------------------------------------
Posted through http://www.DSPRelated.com
Best approach is to take a series of overlapping windowed fft's , with a fr=
ame length of 20ms or so, and store the magnitude of each bin for every fra=
me. Then at the end of the song, find the minimum amplitude for each bin ac=
ross all the stored fft results. This collection of minimum bin magnitudes =
should approximate the noise floor, IF;

1) the noise is stationary=20
2) for each bin there is at least one place in the song where the music ene=
rgy in that bin was below the noise floor.=20

If think you could post -process the result to remove outliers that violate=
 2) above, and interpolate from surrounding bins to fill in the gap.=20

Bob
>Best approach is to take a series of overlapping windowed fft's , with a >frame length of 20ms or so, and store the magnitude of each bin for
every
>frame. Then at the end of the song, find the minimum amplitude for each
bin
>across all the stored fft results. This collection of minimum bin
magnitudes
>should approximate the noise floor, IF; > >1) the noise is stationary >2) for each bin there is at least one place in the song where the music >energy in that bin was below the noise floor. > >If think you could post -process the result to remove outliers that >violate 2) above, and interpolate from surrounding bins to fill in the
gap.
> >Bob
Hi Bob, I've done pretty much as you told me, doing ffts, finding the minimum amplitude for each bin for an approximation of the noise floor and the maximum amplitude for an approximation of the signal. Then I did the variances of both vectors and finally I made a simple signal-to-noise calculation. This approach works better than other methods tried previously but still has many false negatives and false positives and I don't understand why. Can I ask what could be the problems of this kind of method and how it can be improved? Thank you in advance. --------------------------------------- Posted through http://www.DSPRelated.com
By the way, thats the simple piece of code: 

noise=0.0;
sig=0.0;
j=1;
for i=in:fin
        nois(j)=(abs((min(B(:,i)).^2)));
        sign(j)=(abs((max(B(:,i)).^2)));
        j=j+1;
end
snr=var(sign)/var(nois);

where B is the spectrogram matrix.
---------------------------------------
Posted through http://www.DSPRelated.com
I would recommend temporal averaging. Update the power estimate for each bin according to 

av_power(bin,k) = alpha*av_power(bin,k-1) + (1-alpha)*power(bin,k)

Where alpha is some number close to 1.

Or if you have enough memory to store past frames, just average the bin powers over the last 4 frames or so. 

Bob