Skip to content

Commit

Permalink
convert to string for torchscript compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentqb committed Apr 28, 2020
1 parent 9e9a4ff commit 924c37a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchaudio/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def create_fb_matrix(
up_slopes = slopes[:, 2:] / f_diff[1:] # (n_freqs, n_mels)
fb = torch.max(zero, torch.min(down_slopes, up_slopes))

if norm == "slaney":
if str(norm) == "slaney":
# Slaney-style mel is scaled to be approx constant energy per channel
enorm = 2.0 / (f_pts[2 : n_mels + 2] - f_pts[:n_mels])
fb *= enorm.unsqueeze(0)
Expand Down

0 comments on commit 924c37a

Please sign in to comment.