Skip to content

Commit 87d674a

Browse files
committed
bumpup librosa version to 0.8.0
1 parent 110d03e commit 87d674a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

TTS/bin/resample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
from multiprocessing import Pool
77

88
import librosa
9+
import soundfile as sf
910
from tqdm import tqdm
1011

1112

1213
def resample_file(func_args):
1314
filename, output_sr = func_args
1415
y, sr = librosa.load(filename, sr=output_sr)
15-
librosa.output.write_wav(filename, y, sr)
16+
sf.write(filename, y, sr)
1617

1718

1819
if __name__ == "__main__":

TTS/utils/audio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ def spectrogram(self, y):
275275
else:
276276
D = self._stft(y)
277277
S = self._amp_to_db(np.abs(D))
278-
return self.normalize(S)
278+
return self.normalize(S).astype(np.float32)
279279

280280
def melspectrogram(self, y):
281281
if self.preemphasis != 0:
282282
D = self._stft(self.apply_preemphasis(y))
283283
else:
284284
D = self._stft(y)
285285
S = self._amp_to_db(self._linear_to_mel(np.abs(D)))
286-
return self.normalize(S)
286+
return self.normalize(S).astype(np.float32)
287287

288288
def inv_spectrogram(self, spectrogram):
289289
"""Converts spectrogram to waveform using librosa"""

requirements.notebooks.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
bokeh==1.4.0
2-
numba==0.48
1+
bokeh==1.4.0

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ flask
33
gdown
44
inflect
55
jieba
6-
librosa==0.7.2
6+
librosa==0.8.0
77
matplotlib
88
numpy==1.18.5
99
pandas

0 commit comments

Comments
 (0)