From e61fa839f9067326b7e84e7005450f987a6cd51c Mon Sep 17 00:00:00 2001 From: Keith Ito Date: Tue, 26 Sep 2017 08:46:21 -0700 Subject: [PATCH] Remove dead code --- util/audio.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/util/audio.py b/util/audio.py index eacefd6..581511a 100644 --- a/util/audio.py +++ b/util/audio.py @@ -111,7 +111,6 @@ def _stft_parameters(): # Conversions: _mel_basis = None -_inv_mel_basis = None def _linear_to_mel(spectrogram): global _mel_basis @@ -119,12 +118,6 @@ def _linear_to_mel(spectrogram): _mel_basis = _build_mel_basis() return np.dot(_mel_basis, spectrogram) -def _mel_to_linear(mel_spectrogram): - global _inv_mel_basis - if _inv_mel_basis is None: - _inv_mel_basis = np.linalg.pinv(_build_mel_basis()) - return np.maximum(1e-10, np.dot(_inv_mel_basis, mel_spectrogram)) - def _build_mel_basis(): n_fft = (hparams.num_freq - 1) * 2 return librosa.filters.mel(hparams.sample_rate, n_fft, n_mels=hparams.num_mels)