From a8ae436a8d0ba38b0cbf6f04dd094cab2022a760 Mon Sep 17 00:00:00 2001 From: goosepirate <71612256+goosepirate@users.noreply.github.com> Date: Sun, 20 Sep 2020 18:22:52 -0400 Subject: [PATCH 1/4] Update requirements.txt --- requirements.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index aa7140a6..b0326613 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ numpy==1.16.2 -librosa==0.6.3 +librosa +soundfile matplotlib unidecode inflect -nltk \ No newline at end of file +nltk From 084d883e953bc07ff537927bb65973f2e44595cb Mon Sep 17 00:00:00 2001 From: goosepirate <71612256+goosepirate@users.noreply.github.com> Date: Sun, 20 Sep 2020 19:22:52 -0400 Subject: [PATCH 2/4] 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..00c4384e 100644 --- a/utils/dsp.py +++ b/utils/dsp.py @@ -1,6 +1,7 @@ import math import numpy as np import librosa +import soundfile as sf from utils import hparams as hp from scipy.signal import lfilter @@ -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, subtype='PCM_24') def split_signal(x): From 5d53088278a019700c6f96fe66e8e799610a96f5 Mon Sep 17 00:00:00 2001 From: goosepirate <71612256+goosepirate@users.noreply.github.com> Date: Sun, 20 Sep 2020 19:26:47 -0400 Subject: [PATCH 3/4] Update NB4a - Alternative Model (Preprocessing).ipynb --- notebooks/NB4a - Alternative Model (Preprocessing).ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/NB4a - Alternative Model (Preprocessing).ipynb b/notebooks/NB4a - Alternative Model (Preprocessing).ipynb index 79d8d1fd..75a6759b 100644 --- a/notebooks/NB4a - Alternative Model (Preprocessing).ipynb +++ b/notebooks/NB4a - Alternative Model (Preprocessing).ipynb @@ -157,7 +157,7 @@ "metadata": {}, "outputs": [], "source": [ - "librosa.output.write_wav(DATA_PATH + 'test_quant.wav', x, sr=sample_rate)" + "sf.write(DATA_PATH + 'test_quant.wav', x, sample_rate, subtype='PCM_24')" ] }, { From 7be633d713826def7d25e6df0686f99749265e6b Mon Sep 17 00:00:00 2001 From: goosepirate <71612256+goosepirate@users.noreply.github.com> Date: Sun, 20 Sep 2020 19:28:19 -0400 Subject: [PATCH 4/4] Update NB4a - Alternative Model (Preprocessing).ipynb --- notebooks/NB4a - Alternative Model (Preprocessing).ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebooks/NB4a - Alternative Model (Preprocessing).ipynb b/notebooks/NB4a - Alternative Model (Preprocessing).ipynb index 75a6759b..ab628b5a 100644 --- a/notebooks/NB4a - Alternative Model (Preprocessing).ipynb +++ b/notebooks/NB4a - Alternative Model (Preprocessing).ipynb @@ -20,7 +20,8 @@ "import math, pickle, os, glob\n", "import numpy as np\n", "from utils.display import *\n", - "from utils.dsp import *" + "from utils.dsp import *\n", + "import soundfile as sf" ] }, {