fix default dir miss assertion error

This commit is contained in:
Turing's Cat 2024-02-05 09:45:16 +08:00
parent e3d792fb56
commit 9d50702674

View File

@ -29,9 +29,15 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
def __init__(self, hparams, val=False):
exp_dir = hparams.exp_dir
if not os.path.exists("%s/2-name2text.txt" % exp_dir):
exp_dir = "logs/xxx"
self.path2 = "%s/2-name2text.txt" % exp_dir
self.path4 = "%s/4-cnhubert" % exp_dir
self.path5 = "%s/5-wav32k" % exp_dir
f"""-loading self.path2: {self.path2} correctly-"""
assert os.path.exists(self.path2)
assert os.path.exists(self.path4)
assert os.path.exists(self.path5)