From 75b0e03ab3311fddd7e3e16dc158b222a0489d52 Mon Sep 17 00:00:00 2001 From: James Betker Date: Thu, 12 May 2022 20:15:40 -0600 Subject: [PATCH] Add error message --- tortoise/utils/audio.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tortoise/utils/audio.py b/tortoise/utils/audio.py index f68e831..2422e97 100644 --- a/tortoise/utils/audio.py +++ b/tortoise/utils/audio.py @@ -29,6 +29,8 @@ def load_audio(audiopath, sampling_rate): elif audiopath[-4:] == '.mp3': audio, lsr = librosa.load(audiopath, sr=sampling_rate) audio = torch.FloatTensor(audio) + else: + assert False, f"Unsupported audio format provided: {audiopath[-4:]}" # Remove any channel data. if len(audio.shape) > 1: