diff --git a/matcha/hifigan/denoiser.py b/matcha/hifigan/denoiser.py index 9fd3331..452be6a 100644 --- a/matcha/hifigan/denoiser.py +++ b/matcha/hifigan/denoiser.py @@ -4,6 +4,10 @@ import torch +class ModeException(Exception): + pass + + class Denoiser(torch.nn.Module): """Removes model bias from audio produced with waveglow""" @@ -20,7 +24,7 @@ class Denoiser(torch.nn.Module): elif mode == "normal": mel_input = torch.randn((1, 80, 88), dtype=dtype, device=device) else: - raise Exception(f"Mode {mode} if not supported") + raise ModeException(f"Mode {mode} if not supported") def stft_fn(audio, n_fft, hop_length, win_length, window): spec = torch.stft(