General question about Spectral Subtraction

User avatar
rbduck
Posts: 327
Joined: Tue Dec 03, 2019 1:49 pm

General question about Spectral Subtraction

Postby rbduck » Fri May 20, 2022 2:31 pm

Surrounding Noise Reduction (NR) and Noise Reduction 2 in Thetis. I've been reading a lot lately about Spectral Subtraction. Is this the process that is being utilized in Thetis for noise reduction? Simon Brown has stated that this is what he is using in SDR Console for noise reduction. When listening in SDR Console the Spectral Subtraction method sounds a lot what I hear in Thetis. If they are both using this method, it is being utilized much better in Thetis. It sounds better to me. The spectral artifacts, if they can be called that, are greatly reduced in Thetis. If I listen closely I can barely hear it. In SDR Console I have yet to reduce it to a level comparable to Thetis.
Under NR2, the noise in Thetis is almost imperceptible to me.

If this is not the process used in Thetis, then my discussion is moot. There are band conditions so bad in the early morning that I hear other people say it is too bad for acceptable communications. I can hear the noise there, but it is reduced greatly. I have no problems understanding anyone. NR2 in Thetis is so far not exceeded by any other SDR software I have come across.

Am I in the ballpark here?
73
Ruben
NB4R
Apache-Labs Anan 7000DLE MKII Black -- Thetis 2.10.3.6 dev_2 -- Windows 11
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: General question about Spectral Subtraction

Postby w-u-2-o » Fri May 20, 2022 3:01 pm

It's not clear that both Thetis (WDSP) and SDR Console use the same methods. If you take a look at this topic:

viewtopic.php?f=9&t=4018&

Listen to Warren's discussion starting at about minute 13 in the video, and also review the two papers Warren cites (attached to the same post as the video). After doing so, the math does not look quite the same as that typically presented for spectral subtraction, but there are similarities.

The tricky part is estimating the statistical model for speech. This seems to be necessarily done in an a priori fashion. The same model will not be optimal for all speakers, but since the original speech is not available to form a model an a priori estimate is required.

On the other hand, noise can be modelled long term and thus the statistical model for that can be a lot more accurate.

Small changes in the speech model can lead to large differences in performance of the algorithm.
User avatar
w-u-2-o
Posts: 5540
Joined: Fri Mar 10, 2017 1:47 pm

Re: General question about Spectral Subtraction

Postby w-u-2-o » Sat May 21, 2022 10:00 pm

Further research on the topic clarifies that NR2 is most definitely NOT spectral subtraction.

Spectral subtractive algorithms are probably the simplest class of algorithms one might implement in the frequency domain, by far. While superior to time domain algorithms like LMS (least mean square, definitely the most popular algorithm in knobified radios), they nevertheless have a number of shortcomings. They are based upon the idea that the noise is additive and that you can estimate its spectrum when the signal is not present and then subtract it from the total. Spectral subtraction using Fourier transforms was first proposed by Boll in 1979.

NR2, a derivation of the work of Ephraim and Malah, Fodor, and others, belongs to the class of statistical model based algorithms. The basic idea here is to derive the maximum likelihood spectrum of the clean signal. Testing has shown these more advanced approaches produce better results than spectral subtractive algorithms. However, that comes with the price of more complex algorithms and coding and with more compute cycles.

This is why the NR2 algorithm remains the best available (IMHO) in amateur radio. Certainly Simon's choice of a spectral subtraction method is much better than time domain methods like LMS. Even so, Simon may wish to move up another level and implement a statistic model based method using the papers that Warren referenced in his talk on the subject.
User avatar
rbduck
Posts: 327
Joined: Tue Dec 03, 2019 1:49 pm

Re: General question about Spectral Subtraction

Postby rbduck » Sun May 22, 2022 12:35 pm

w-u-2-o wrote:Further research on the topic clarifies that NR2 is most definitely NOT spectral subtraction.

Spectral subtractive algorithms are probably the simplest class of algorithms one might implement in the frequency domain, by far. While superior to time domain algorithms like LMS (least mean square, definitely the most popular algorithm in knobified radios), they nevertheless have a number of shortcomings. They are based upon the idea that the noise is additive and that you can estimate its spectrum when the signal is not present and then subtract it from the total. Spectral subtraction using Fourier transforms was first proposed by Boll in 1979.

NR2, a derivation of the work of Ephraim and Malah, Fodor, and others, belongs to the class of statistical model based algorithms. The basic idea here is to derive the maximum likelihood spectrum of the clean signal. Testing has shown these more advanced approaches produce better results than spectral subtractive algorithms. However, that comes with the price of more complex algorithms and coding and with more compute cycles.

This is why the NR2 algorithm remains the best available (IMHO) in amateur radio. Certainly Simon's choice of a spectral subtraction method is much better than time domain methods like LMS. Even so, Simon may wish to move up another level and implement a statistic model based method using the papers that Warren referenced in his talk on the subject.




Thank you Scott for that explanation. I watched Warren's presentation about Noise Reduction. It was clear concise and with your added comments, easy to understand. After watching the video I realized that I had watched it several years ago. I do understand more about it now that several years ago. I didn't see a specific paper on noise reduction, but I did see, read and understand the best I can, his paper on programming WSDM.

NR2 is very well conceived and programmed. I would hate to know the number of hours he spent testing the algorithms. Of course some folk can put something like that together and it will work well the first time it was tested. I don't want to be negative on Simon's spectral subtraction method, but I find it distracting. for me, it replaces one noise with another. But then, NR2 in Thetis may have spoiled me somewhat.

I programmed production control systems for a chemical company in the 90's. Due to a problem with chronic migraine headaches, I had to give up that pursuit. That has helped me to read and understand the math and programming surrounding used in most apps. Programming languages have come a long way since the 90's, I'm now watching some YouTube trying to get back in the saddle. I might get enough of it to do some other things I've been wanting to do. I will never be able to pull off what Warren, Richie and others have done in the assembly of Thetis. It is a gem among SDR apps. Again thank you for the information you have provided here. It has answered my questions.
73
Ruben
NB4R
Apache-Labs Anan 7000DLE MKII Black -- Thetis 2.10.3.6 dev_2 -- Windows 11

Return to “Thetis”