From 2d0c10b0e0c8f83fa32fcb080a5dfeb4b8beb6ec Mon Sep 17 00:00:00 2001 From: wy Date: Tue, 16 Nov 2021 19:31:07 +0800 Subject: [PATCH] feature: update requirements.txt and output wav file --- noise.py | 3 ++- requirements.txt | 42 +++++++++++++++++++++++++++--------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/noise.py b/noise.py index 8c893f2..830003b 100644 --- a/noise.py +++ b/noise.py @@ -5,6 +5,7 @@ import python_speech_features import scipy as sp from scipy import signal +import soundfile as sf # http://python-speech-features.readthedocs.io/en/latest/ # https://github.com/jameslyons/python_speech_features @@ -200,7 +201,7 @@ def enhance(y): ------------------------------------''' def output_file(destination ,filename, y, sr, ext=""): destination = destination + filename[:-4] + ext + '.wav' - librosa.output.write_wav(destination, y, sr) + sf.write(destination, y, sr) '''------------------------------------ diff --git a/requirements.txt b/requirements.txt index 3b46f15..6bf3286 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,15 +1,27 @@ -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 +appdirs==1.4.4 +audioread==2.1.9 +certifi==2021.10.8 +cffi==1.15.0 +charset-normalizer==2.0.7 +Cython==0.29.24 +decorator==5.1.0 +idna==3.3 +joblib==1.1.0 +librosa==0.8.1 +llvmlite==0.37.0 +numba==0.54.1 +numpy==1.20.3 +packaging==21.2 +pooch==1.5.2 +pycparser==2.21 +pyparsing==2.4.7 +pysndfx==0.3.6 +python-speech-features==0.6 +requests==2.26.0 +resampy==0.2.2 +scikit-learn==1.0.1 +scipy==1.7.2 +six==1.16.0 +SoundFile==0.10.3.post1 +threadpoolctl==3.0.0 +urllib3==1.26.7