mirror of
https://github.com/svc-develop-team/so-vits-svc.git
synced 2025-01-09 04:27:31 +08:00
chore: friendly error report
This commit is contained in:
parent
22a881223c
commit
7336590c62
@ -48,8 +48,9 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
|
|||||||
filename = filename.replace("\\", "/")
|
filename = filename.replace("\\", "/")
|
||||||
audio, sampling_rate = load_wav_to_torch(filename)
|
audio, sampling_rate = load_wav_to_torch(filename)
|
||||||
if sampling_rate != self.sampling_rate:
|
if sampling_rate != self.sampling_rate:
|
||||||
raise ValueError("{}: {} SR doesn't match target {} SR".format(
|
raise ValueError(
|
||||||
filename, sampling_rate, self.sampling_rate))
|
"Sample Rate not match. Expect {} but got {} from {}".format(
|
||||||
|
self.sampling_rate, sampling_rate, filename))
|
||||||
audio_norm = audio / self.max_wav_value
|
audio_norm = audio / self.max_wav_value
|
||||||
audio_norm = audio_norm.unsqueeze(0)
|
audio_norm = audio_norm.unsqueeze(0)
|
||||||
spec_filename = filename.replace(".wav", ".spec.pt")
|
spec_filename = filename.replace(".wav", ".spec.pt")
|
||||||
|
Loading…
Reference in New Issue
Block a user