From e8c53e48c0d84c5f3a3b3340eec0624168793f7d Mon Sep 17 00:00:00 2001 From: 6d8 <94956062+6d8@users.noreply.github.com> Date: Tue, 1 Mar 2022 18:50:15 -0800 Subject: [PATCH] Update dsp.py --- utils/dsp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/dsp.py b/utils/dsp.py index 885d34db..70496d06 100644 --- a/utils/dsp.py +++ b/utils/dsp.py @@ -3,6 +3,7 @@ import librosa from utils import hparams as hp from scipy.signal import lfilter +import soundfile as sf def label_2_float(x, bits): @@ -20,7 +21,7 @@ def load_wav(path): def save_wav(x, path): - librosa.output.write_wav(path, x.astype(np.float32), sr=hp.sample_rate) + sf.write(path, x.astype(np.float32), hp.sample_rate) def split_signal(x):