Skip to content

Commit

Permalink
fixed #1240, mel axis scale inference (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Apr 9, 2021
1 parent bed94c2 commit e11a7cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions librosa/display.py
Expand Up @@ -1121,13 +1121,13 @@ def __coord_fft_hz(n, sr=22050, **_kwargs):
return basis


def __coord_mel_hz(n, fmin=0, fmax=11025.0, **_kwargs):
def __coord_mel_hz(n, fmin=0, fmax=None, sr=22050, **_kwargs):
"""Get the frequencies for Mel bins"""

if fmin is None:
fmin = 0
if fmax is None:
fmax = 11025.0
fmax = 0.5 * sr

basis = core.mel_frequencies(n, fmin=fmin, fmax=fmax)
basis[1:] -= 0.5 * np.diff(basis)
Expand Down

0 comments on commit e11a7cc

Please sign in to comment.