Skip to content

Commit 6f0495e

Browse files
committed
fix for fmax is None
1 parent 1ed1b5d commit 6f0495e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

audio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def _linear_to_mel(spectrogram):
6969

7070

7171
def _build_mel_basis():
72-
assert hparams.fmax <= hparams.sample_rate // 2
72+
if hparams.fmax is not None:
73+
assert hparams.fmax <= hparams.sample_rate // 2
7374
return librosa.filters.mel(hparams.sample_rate, hparams.fft_size,
7475
fmin=hparams.fmin, fmax=hparams.fmax,
7576
n_mels=hparams.num_mels)

0 commit comments

Comments
 (0)