Skip to content

Commit

Permalink
bumpup librosa version to 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
erogol committed May 3, 2021
1 parent 110d03e commit 87d674a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion TTS/bin/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
from multiprocessing import Pool

import librosa
import soundfile as sf
from tqdm import tqdm


def resample_file(func_args):
filename, output_sr = func_args
y, sr = librosa.load(filename, sr=output_sr)
librosa.output.write_wav(filename, y, sr)
sf.write(filename, y, sr)


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions TTS/utils/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,15 @@ def spectrogram(self, y):
else:
D = self._stft(y)
S = self._amp_to_db(np.abs(D))
return self.normalize(S)
return self.normalize(S).astype(np.float32)

def melspectrogram(self, y):
if self.preemphasis != 0:
D = self._stft(self.apply_preemphasis(y))
else:
D = self._stft(y)
S = self._amp_to_db(self._linear_to_mel(np.abs(D)))
return self.normalize(S)
return self.normalize(S).astype(np.float32)

def inv_spectrogram(self, spectrogram):
"""Converts spectrogram to waveform using librosa"""
Expand Down
3 changes: 1 addition & 2 deletions requirements.notebooks.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
bokeh==1.4.0
numba==0.48
bokeh==1.4.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ flask
gdown
inflect
jieba
librosa==0.7.2
librosa==0.8.0
matplotlib
numpy==1.18.5
pandas
Expand Down

0 comments on commit 87d674a

Please sign in to comment.