noise_reduction
noise_reduction copied to clipboard
when I run noise.py, met follows problem, can help find some causes?
(py3virtualenv) [root@node1 noise_reduction]# python noise.py
Traceback (most recent call last):
File "noise.py", line 230, in
Hi,
I cannot reproduce this issue on my machine. It looks like an environment issue. Could be a the version of six or pysndfx.
Maybe the following information will help:
- Did you installed requirements.txt --
$ pip install -r requirements.txtor$ pip3 install -r requirements.txt? - Can you paste your own virtualenv requirements.txt (using
$ pip freeze > requiremenets.txt)?
Your virtualenv requirements file should look like this:
appdirs==1.4.3
audioread==2.1.4
Cython==0.25.2
decorator==4.0.11
joblib==0.11
librosa==0.5.0
numpy==1.12.1
packaging==16.8
pyparsing==2.2.0
pysndfx==0.1.0
python-speech-features==0.5
resampy==0.1.5
scikit-learn==0.18.1
scipy==0.19.0
six==1.10.0
same problem here: centos 7, sox 14.4.1 what's your sox version? appdirs==1.4.3 audioread==2.1.4 Cython==0.25.2 decorator==4.0.11 joblib==0.11 librosa==0.5.0 numpy==1.12.1 packaging==16.8 pyparsing==2.2.0 pysndfx==0.1.0 python-speech-features==0.5 resampy==0.1.5 scikit-learn==0.18.1 scipy==0.19.0 six==1.10.0
upgrade to sox 14.4.2 still got error
File "noise/lib/python2.7/site-packages/pysndfx/dsp.py", line 276, in call raise RuntimeError(stderr.decode()) RuntimeError: sox FAIL bass: usage: gain [frequency(100) width[s|h|k|q|o]]
python version? I'm running Python 3.6.0.
I'm getting the same error. Is it any solutions available? Python version 3.6.0
Dodiku, what version of SoX are you using?
this is what i'm getting:
$ sox --version
sox: SoX v
hm, it's strange. That's my output:
sox --version
sox: SoX v14.4.2
Also I found out that this error message caused by functions reduce_noise_centroid_s and reduce_noise_centroid_mb, where threshold_l has a zero value, but if set value threshold_l for example 100 this error message are not shown.
Oh, great! Thanks for the update.
Feel free to send a pull request with an update for the documentation (in the readme or in the code), or to handle this error in the code.
Let me know if this issue can be closed.
@pobedyn your solution worked for me, thanks. I set the value of threshold_l = 1E-08 in reduce_noise_centroid_s( ) and reduce_noise_centroid_mb( ). But @dodiku , I think there should be some better fix to this issue as threshold_l may not always be close to zero.
@aakash30jan yeah, I agree. Would you like to edit the code and send a pull request?
I had the same problem as above. From a disc that failed, it became unavailable for recording, after repairing the disc, the audio file takes almost 3 hours of lecture. Tried to remove the noise. The computer hung up after a minute of the script. I had an idea to break 3 hours by 10 minutes ffmpeg. The first two files were cleared, and the rest did not want and gave an error, which is higher. Then the files that were not cleaned, I opened in Audacity and just saved with a slightly lower data transfer rate, it was 112, I saved it in 96 with a constant data transfer rate. The file itself was recorded on a dictaphone with two microphones. The right and left channels were different. In the right was the noise next to the recorder, and in the left channel there was a more distant noise. As a result, not all files worked, but most of them managed to be cleared of noise. The problem here is not in the script, but in the file itself, in the players, this audio file is played normally. Sorry for the English translator Google translator.
@pobedyn worked with me too