mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Bug fix, prevent save_wav to modify given variable
This commit is contained in:
+2
-2
@@ -37,8 +37,8 @@ class AudioProcessor(object):
|
||||
print(" | > Preemphasis is deactive.")
|
||||
|
||||
def save_wav(self, wav, path):
|
||||
wav *= 32767 / max(0.01, np.max(np.abs(wav)))
|
||||
librosa.output.write_wav(path, wav.astype(np.int16), self.sample_rate)
|
||||
wav_norm *= 32767 / max(0.01, np.max(np.abs(wav)))
|
||||
librosa.output.write_wav(path, wav_norm.astype(np.int16), self.sample_rate)
|
||||
|
||||
def _linear_to_mel(self, spectrogram):
|
||||
global _mel_basis
|
||||
|
||||
Reference in New Issue
Block a user