Skip to content

Commit

Permalink
raise error if incorrect parameter choice.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentqb committed May 26, 2020
1 parent 5e24d91 commit f43e5ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions torchaudio/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ def create_fb_matrix(
size (..., ``n_freqs``), the applied result would be
``A * create_fb_matrix(A.size(-1), ...)``.
"""

if norm is not None and norm != "slaney":
raise ValueError("norm must be one of None or 'slaney'")

# freq bins
# Equivalent filterbank construction by Librosa
all_freqs = torch.linspace(0, sample_rate // 2, n_freqs)
Expand Down

0 comments on commit f43e5ce

Please sign in to comment.