Remove dead code

pull/2/head
Keith Ito 2017-09-26 08:46:21 -07:00
parent faf7b8d083
commit e61fa839f9
1 changed files with 0 additions and 7 deletions

View File

@ -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)