代码拉取完成,页面将自动刷新
同步操作将从 东方佑/TTS-Clone-Chinese 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
from synthesizer.synthesize import run_synthesis
from synthesizer.hparams import hparams
from utils.argutils import print_args
import argparse
import os
if __name__ == "__main__":
class MyFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter):
pass
parser = argparse.ArgumentParser(
description="Creates ground-truth aligned (GTA) spectrograms from the vocoder.",
formatter_class=MyFormatter
)
parser.add_argument("datasets_root", type=str, help=\
"Path to the directory containing your SV2TTS directory. If you specify both --in_dir and "
"--out_dir, this argument won't be used.")
parser.add_argument("--model_dir", type=str,
default="synthesizer/saved_models/logs-pretrained/", help=\
"Path to the pretrained model directory.")
parser.add_argument("-i", "--in_dir", type=str, default=argparse.SUPPRESS, help= \
"Path to the synthesizer directory that contains the mel spectrograms, the wavs and the "
"embeds. Defaults to <datasets_root>/SV2TTS/synthesizer/.")
parser.add_argument("-o", "--out_dir", type=str, default=argparse.SUPPRESS, help= \
"Path to the output vocoder directory that will contain the ground truth aligned mel "
"spectrograms. Defaults to <datasets_root>/SV2TTS/vocoder/.")
parser.add_argument("--hparams", default="",
help="Hyperparameter overrides as a comma-separated list of name=value "
"pairs")
args = parser.parse_args()
print_args(args, parser)
modified_hp = hparams.parse(args.hparams)
if not hasattr(args, "in_dir"):
args.in_dir = os.path.join(args.datasets_root, "SV2TTS", "synthesizer")
if not hasattr(args, "out_dir"):
args.out_dir = os.path.join(args.datasets_root, "SV2TTS", "vocoder")
run_synthesis(args.in_dir, args.out_dir, args.model_dir, modified_hp)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。