# scipy.signal.wiener for audio processing

Does some have an example of what a Wiener filter (that can be used directly with scipy.signal.wiener) can be useful for, in sound processing (it seems that such adaptive filters can be useful for noise reduction, etc.) ?

I tried with various (noisy + sinusoids) soundfiles (read into an array x) with the command

y = wiener(x)


But it doesn't give such great result... (Normal : I cannot expect something magical with just a simple function that doesn't take any parameter!)

I just wondered what this function could be useful for (sound processing).

The Wiener filter is a simple deblurring filter for denoising images. This is not the Wiener filter commonly described in image reconstruction problems but instead it is a simple, local-mean filter. Let $x$ be the input signal, then the output is $$y = \left\{ \begin{array}{cl} \frac{\sigma^2}{\sigma_x^2} m_x + ( 1 - \frac{\sigma^2}{\sigma_x^2}) x & \sigma_x^2 \ge \sigma^2\\ m_x & \sigma_x^2 \lt \sigma^2 \end{array} \right.$$ where $m_{x}$ is the local estimate of the mean and $\sigma_{x}^{2}$ is the local estimate of the variance. The window for these estimates is an optional input parameter (default is $3\times3$ ). The parameter $\sigma^{2}$ is a threshold noise parameter. If $\sigma$ is not given then it is estimated as the average of the local variances.