Bug fix audio saving

This commit is contained in:
Eren 2018-09-19 15:45:08 +02:00
parent 10c2ff2074
commit a165cd7bda
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class AudioProcessor(object):
print(" | > Preemphasis is deactive.")
def save_wav(self, wav, path):
wav_norm *= 32767 / max(0.01, np.max(np.abs(wav)))
wav_norm = wav * (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):