mirror of
https://github.com/shivammehta25/Matcha-TTS.git
synced 2026-02-04 09:49:21 +08:00
add dummy exception (W0719)
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
|
||||||
|
class ModeException(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Denoiser(torch.nn.Module):
|
class Denoiser(torch.nn.Module):
|
||||||
"""Removes model bias from audio produced with waveglow"""
|
"""Removes model bias from audio produced with waveglow"""
|
||||||
|
|
||||||
@@ -20,7 +24,7 @@ class Denoiser(torch.nn.Module):
|
|||||||
elif mode == "normal":
|
elif mode == "normal":
|
||||||
mel_input = torch.randn((1, 80, 88), dtype=dtype, device=device)
|
mel_input = torch.randn((1, 80, 88), dtype=dtype, device=device)
|
||||||
else:
|
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):
|
def stft_fn(audio, n_fft, hop_length, win_length, window):
|
||||||
spec = torch.stft(
|
spec = torch.stft(
|
||||||
|
|||||||
Reference in New Issue
Block a user