Raising magnitude to higher power prior to GL seems to reduce artifacts.

pull/2/head
Keith Ito 2017-07-12 08:16:23 -07:00
parent 3ad67c9d02
commit cc9ee0073b
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def spectrogram(y):
def inv_spectrogram(spectrogram):
S = _db_to_amp(_denormalize(spectrogram) + hparams.ref_level_db) # Convert back to linear
return _inv_preemphasis(_griffin_lim(S ** 1.2)) # Reconstruct phase
return _inv_preemphasis(_griffin_lim(S ** 1.5)) # Reconstruct phase
def melspectrogram(y):
@ -34,7 +34,7 @@ def melspectrogram(y):
def inv_melspectrogram(melspectrogram):
S = _mel_to_linear(_db_to_amp(_denormalize(melspectrogram))) # Convert back to linear
return _inv_preemphasis(_griffin_lim(S ** 1.2)) # Reconstruct phase
return _inv_preemphasis(_griffin_lim(S ** 1.5)) # Reconstruct phase
# Based on https://github.com/librosa/librosa/issues/434