|
@@ -101,9 +101,9 @@ def mel_filters(device, n_mels: int = N_MELS) -> torch.Tensor:
|
|
)
|
|
)
|
|
"""
|
|
"""
|
|
assert n_mels == 80, f"Unsupported n_mels: {n_mels}"
|
|
assert n_mels == 80, f"Unsupported n_mels: {n_mels}"
|
|
- with np.load(
|
|
|
|
- os.path.join(os.path.dirname(__file__), "assets", "mel_filters.npz")
|
|
|
|
- ) as f:
|
|
|
|
|
|
+
|
|
|
|
+ filters_path = os.path.join(os.path.dirname(__file__), "assets", "mel_filters.npz")
|
|
|
|
+ with np.load(filters_path, allow_pickle=False) as f:
|
|
return torch.from_numpy(f[f"mel_{n_mels}"]).to(device)
|
|
return torch.from_numpy(f[f"mel_{n_mels}"]).to(device)
|
|
|
|
|
|
|
|
|