|
|
@ -38,7 +38,12 @@ semantic_path = "%s/6-name2semantic-%s.tsv" % (opt_dir, i_part)
|
|
|
|
if os.path.exists(semantic_path) == False:
|
|
|
|
if os.path.exists(semantic_path) == False:
|
|
|
|
os.makedirs(opt_dir, exist_ok=True)
|
|
|
|
os.makedirs(opt_dir, exist_ok=True)
|
|
|
|
|
|
|
|
|
|
|
|
device = "cuda:0" if torch.cuda.is_available() else "mps"
|
|
|
|
if torch.cuda.is_available():
|
|
|
|
|
|
|
|
device = "cuda"
|
|
|
|
|
|
|
|
elif torch.backends.mps.is_available():
|
|
|
|
|
|
|
|
device = "mps"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
device = "cpu"
|
|
|
|
hps = utils.get_hparams_from_file(s2config_path)
|
|
|
|
hps = utils.get_hparams_from_file(s2config_path)
|
|
|
|
vq_model = SynthesizerTrn(
|
|
|
|
vq_model = SynthesizerTrn(
|
|
|
|
hps.data.filter_length // 2 + 1,
|
|
|
|
hps.data.filter_length // 2 + 1,
|
|
|
|