[Cleanup] Replace bare print() with logger and use specific exception types (#2228)
Signed-off-by: Lidang Jiang <lidangjiang@gmail.com> Signed-off-by: Lidang-Jiang <lidangjiang@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
cd71567b06
commit
515d15ef87
7 files changed
+22
-10
No files matched your search
@@ -180,7 +180,7 @@ def log_mel_spectrogram(
|
||||
HOP_LENGTH = 160
|
||||
|
||||
if not torch.is_tensor(audio):
|
||||
raise Exception(f"audio is not tensor {type(audio)}")
|
||||
raise TypeError(f"audio is not tensor {type(audio)}")
|
||||
|
||||
if device is not None:
|
||||
audio = audio.to(device)
|
||||
|
||||
Reference in new issue
Block a user