mirror of https://github.com/coqui-ai/TTS.git
Bug fix, prevent save_wav to modify given variable
This commit is contained in:
parent
2bcd7dbb6f
commit
c52d3f16f9
|
@ -37,8 +37,8 @@ class AudioProcessor(object):
|
||||||
print(" | > Preemphasis is deactive.")
|
print(" | > Preemphasis is deactive.")
|
||||||
|
|
||||||
def save_wav(self, wav, path):
|
def save_wav(self, wav, path):
|
||||||
wav *= 32767 / max(0.01, np.max(np.abs(wav)))
|
wav_norm *= 32767 / max(0.01, np.max(np.abs(wav)))
|
||||||
librosa.output.write_wav(path, wav.astype(np.int16), self.sample_rate)
|
librosa.output.write_wav(path, wav_norm.astype(np.int16), self.sample_rate)
|
||||||
|
|
||||||
def _linear_to_mel(self, spectrogram):
|
def _linear_to_mel(self, spectrogram):
|
||||||
global _mel_basis
|
global _mel_basis
|
||||||
|
|
Loading…
Reference in New Issue