2
$\begingroup$

Is there a good, documented open source implementation of spectral subtraction in Python?

I've searched a lot but I've only come across pieces of code where I can't really understand what's going on as they are undocumented. For example. Can someone either point me to some implementation or explain step by step what is happening in the above link or here for example.

$\endgroup$
3
$\begingroup$

Of the two Python code examples you found, I think the second one is clearer and likely to serve you better in your efforts to understand spectral subtraction and develop a Python script-file for your work.

The "noise_subtraction.py" script-file implements a basic power spectral subtraction method. A good paper that describes this method is: "Enhancement of speech corrupted by acoustic noise", Proceedings of the International IEEE Conference on Speech, Acoustics and Signal Processing, 208-211, 1979. Since you are student at Imperial College, you should have no problem finding this paper.

A related resource that you'll want to find is the Speech Enhancement: Theory and Practice textbook. It describes several spectral subtraction methods and includes functional Matlab script-files that demonstrate the methods. In particular is a Matlab implementation of the method described in the Berouti et al. paper.

I know you are looking specifically for Python code, but if you review the material I've suggested and are able to obtain the basic power spectral subtraction Matlab code in the Loizou textbook you'll be in a position to use the "noise_subtraction.py" code you found.

As a final note, see this site for additional papers and Matlab code on speech related processing.

I hope this helps.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.