代码拉取完成,页面将自动刷新
同步操作将从 rjyrjy/TTS-Clone-Chinese 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
from synthesizer.hparams import hparams
from synthesizer.train import tacotron_train
from utils.argutils import print_args
from synthesizer import infolog
import argparse
import os
def prepare_run(args):
modified_hp = hparams.parse(args.hparams)
os.environ["TF_CPP_MIN_LOG_LEVEL"] = str(args.tf_log_level)
run_name = args.name
log_dir = os.path.join(args.models_dir, "logs-{}".format(run_name))
os.makedirs(log_dir, exist_ok=True)
infolog.init(os.path.join(log_dir, "Terminal_train_log"), run_name, args.slack_url)
return log_dir, modified_hp
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("name", help="Name of the run and of the logging directory.")
parser.add_argument("synthesizer_root", type=str, help=\
"Path to the synthesizer training data that contains the audios and the train.txt file. "
"If you let everything as default, it should be <datasets_root>/SV2TTS/synthesizer/.")
parser.add_argument("-m", "--models_dir", type=str, default="synthesizer/saved_models/", help=\
"Path to the output directory that will contain the saved model weights and the logs.")
parser.add_argument("--mode", default="synthesis",
help="mode for synthesis of tacotron after training")
parser.add_argument("--GTA", default="True",
help="Ground truth aligned synthesis, defaults to True, only considered "
"in Tacotron synthesis mode")
parser.add_argument("--restore", type=bool, default=True,
help="Set this to False to do a fresh training")
parser.add_argument("--summary_interval", type=int, default=2500,
help="Steps between running summary ops")
parser.add_argument("--embedding_interval", type=int, default=10000,
help="Steps between updating embeddings projection visualization")
parser.add_argument("--checkpoint_interval", type=int, default=2000, # Was 5000
help="Steps between writing checkpoints")
parser.add_argument("--eval_interval", type=int, default=100000, # Was 10000
help="Steps between eval on test data")
parser.add_argument("--tacotron_train_steps", type=int, default=2000000, # Was 100000
help="total number of tacotron training steps")
parser.add_argument("--tf_log_level", type=int, default=1, help="Tensorflow C++ log level.")
parser.add_argument("--slack_url", default=None,
help="slack webhook notification destination link")
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)
log_dir, hparams = prepare_run(args)
tacotron_train(args, log_dir, hparams)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。