Skip to content

Commit

Permalink
add keyword names to librosa.filters.mel function call
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtaFetrat committed Apr 15, 2024
1 parent cdd0674 commit 693f645
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion synthesizer/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _mel_to_linear(mel_spectrogram, hparams):

def _build_mel_basis(hparams):
assert hparams.fmax <= hparams.sample_rate // 2
return librosa.filters.mel(hparams.sample_rate, hparams.n_fft, n_mels=hparams.num_mels,
return librosa.filters.mel(sr=hparams.sample_rate, n_fft=hparams.n_fft, n_mels=hparams.num_mels,
fmin=hparams.fmin, fmax=hparams.fmax)

def _amp_to_db(x, hparams):
Expand Down
4 changes: 2 additions & 2 deletions synthesizer/audio_v2(support_hifigan).py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def inv_preemphasis(wav, k, inv_preemphasize=True):

def _build_mel_basis(hparams):
return librosa.filters.mel(
hparams.sample_rate,
hparams.n_fft,
sr=hparams.sample_rate,
n_fft=hparams.n_fft,
n_mels=hparams.num_mels,
fmin=hparams.fmin,
fmax=hparams.fmax,
Expand Down
2 changes: 1 addition & 1 deletion vocoder/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def linear_to_mel(spectrogram):


def build_mel_basis():
return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels, fmin=hp.fmin)
return librosa.filters.mel(sr=hp.sample_rate, n_fft=hp.n_fft, n_mels=hp.num_mels, fmin=hp.fmin)


def normalize(S):
Expand Down

0 comments on commit 693f645

Please sign in to comment.