MCPcopy Index your code
hub / github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI / train1key

Function train1key

infer-web.py:689–750  ·  view source on GitHub ↗
(
    exp_dir1,
    sr2,
    if_f0_3,
    trainset_dir4,
    spk_id5,
    np7,
    f0method8,
    save_epoch10,
    total_epoch11,
    batch_size12,
    if_save_latest13,
    pretrained_G14,
    pretrained_D15,
    gpus16,
    if_cache_gpu17,
    if_save_every_weights18,
    version19,
    gpus_rmvpe,
)

Source from the content-addressed store, hash-verified

687
688# but5.click(train1key, [exp_dir1, sr2, if_f0_3, trainset_dir4, spk_id5, gpus6, np7, f0method8, save_epoch10, total_epoch11, batch_size12, if_save_latest13, pretrained_G14, pretrained_D15, gpus16, if_cache_gpu17], info3)
689def train1key(
690 exp_dir1,
691 sr2,
692 if_f0_3,
693 trainset_dir4,
694 spk_id5,
695 np7,
696 f0method8,
697 save_epoch10,
698 total_epoch11,
699 batch_size12,
700 if_save_latest13,
701 pretrained_G14,
702 pretrained_D15,
703 gpus16,
704 if_cache_gpu17,
705 if_save_every_weights18,
706 version19,
707 gpus_rmvpe,
708):
709 infos = []
710
711 def get_info_str(strr):
712 infos.append(strr)
713 return "\n".join(infos)
714
715 # step1:处理数据
716 yield get_info_str(i18n("step1:正在处理数据"))
717 [get_info_str(_) for _ in preprocess_dataset(trainset_dir4, exp_dir1, sr2, np7)]
718
719 # step2a:提取音高
720 yield get_info_str(i18n("step2:正在提取音高&正在提取特征"))
721 [
722 get_info_str(_)
723 for _ in extract_f0_feature(
724 gpus16, np7, f0method8, if_f0_3, exp_dir1, version19, gpus_rmvpe
725 )
726 ]
727
728 # step3a:训练模型
729 yield get_info_str(i18n("step3a:正在训练模型"))
730 click_train(
731 exp_dir1,
732 sr2,
733 if_f0_3,
734 spk_id5,
735 save_epoch10,
736 total_epoch11,
737 batch_size12,
738 if_save_latest13,
739 pretrained_G14,
740 pretrained_D15,
741 gpus16,
742 if_cache_gpu17,
743 if_save_every_weights18,
744 version19,
745 )
746 yield get_info_str(i18n("训练结束, 您可查看控制台训练日志或实验文件夹下的train.log"))

Callers

nothing calls this directly

Calls 5

get_info_strFunction · 0.85
preprocess_datasetFunction · 0.85
extract_f0_featureFunction · 0.85
click_trainFunction · 0.85
train_indexFunction · 0.85

Tested by

no test coverage detected