issue on noise cancellation using echo_cancel.py
Hi Wramberg,
I'm currently on a machine anomaly detection project and would like to utilize this lib for doing pre-process audio filtering while collecting machine sounds, like filtering out ventilation noise and etc. I tested the performance of nlms using your provided speech.npy and it actually sounds pretty good on the performance. (I set it with sample_freq as 12000). Later I encountered problems migrating to using source signal instead of white noise for "v", and soon I get into RuntimeWarning: invalid value encountered in multiply w = leakstep * w + step * normFactor * x * e[n], any idea on solving this issue? Bascially I use 10 s human vocal sound as src signal "v" (48000 sample_freq) and 10 s machine sound as noise "u" (also 48000 sample_freq) to feed into the filter, and set the coeffs M, and miu same as in the example.
I believe this echo cancellation algo will work for noise cancellation right? Since you guys mention in the documentation that "If John speaks, the error should equal his speech, that is, e(n) should equal v(n)."
Many thanks if you guys can help me solve this annoying issue!
Hi @CodyWangYaohui, did you ever find a way to fix this issue? I haven't worked with adaptive filters for quite a while, but as far as I recall the "leaky" LMS algorithm can be used to overcome some stability issues that arise due to finite precision. The adaptfilt nlms function defaults to leak=0. Perhaps it'll perform better that set to a small positive number...