1 Star 0 Fork 37

一个达布刘/real-time-voice-cloning

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
synthesizer_train.py 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
Corentin Jemine 提交于 2021-12-28 13:18 . Major maintenance update (#961)
from pathlib import Path
from synthesizer.hparams import hparams
from synthesizer.train import train
from utils.argutils import print_args
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("run_id", type=str, help= \
"Name for this model. By default, training outputs will be stored to saved_models/<run_id>/. If a model state "
"from the same run ID was previously saved, the training will restart from there. Pass -f to overwrite saved "
"states and restart from scratch.")
parser.add_argument("syn_dir", type=Path, help= \
"Path to the synthesizer directory that contains the ground truth mel spectrograms, "
"the wavs and the embeds.")
parser.add_argument("-m", "--models_dir", type=Path, default="saved_models", help=\
"Path to the output directory that will contain the saved model weights and the logs.")
parser.add_argument("-s", "--save_every", type=int, default=1000, help= \
"Number of steps between updates of the model on the disk. Set to 0 to never save the "
"model.")
parser.add_argument("-b", "--backup_every", type=int, default=25000, help= \
"Number of steps between backups of the model. Set to 0 to never make backups of the "
"model.")
parser.add_argument("-f", "--force_restart", action="store_true", help= \
"Do not load any saved model and restart from scratch.")
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)
args.hparams = hparams.parse(args.hparams)
# Run the training
train(**vars(args))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/WAR_TO_THE_END/real-time-voice-cloning.git
git@gitee.com:WAR_TO_THE_END/real-time-voice-cloning.git
WAR_TO_THE_END
real-time-voice-cloning
real-time-voice-cloning
master

搜索帮助