From 5c60ad634c4db1b9bcaca72108c95bdbc5f0330c Mon Sep 17 00:00:00 2001 From: Rice Cake Date: Mon, 22 Jan 2024 20:21:29 +0800 Subject: [PATCH 01/16] Add files via upload --- webui.py | 118 ++++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 63 deletions(-) diff --git a/webui.py b/webui.py index 60c6e1b..e23353c 100644 --- a/webui.py +++ b/webui.py @@ -1,22 +1,16 @@ -import os,shutil,sys,pdb -now_dir = os.getcwd() -sys.path.append(now_dir) import json,yaml,warnings,torch import platform import psutil +import os import signal warnings.filterwarnings("ignore") torch.manual_seed(233333) +import os,pdb,sys +now_dir = os.getcwd() tmp = os.path.join(now_dir, "TEMP") os.makedirs(tmp, exist_ok=True) os.environ["TEMP"] = tmp -if(os.path.exists(tmp)): - for name in os.listdir(tmp): - if(name=="jieba.cache"):continue - path="%s/%s"%(tmp,name) - delete=os.remove if os.path.isfile(path) else shutil.rmtree - delete(path) import site site_packages_roots = [] for path in site.getsitepackages(): @@ -32,15 +26,15 @@ for site_packages_root in site_packages_roots: "%s\n%s/tools\n%s/tools/damo_asr\n%s/GPT_SoVITS\n%s/tools/uvr5" % (now_dir, now_dir, now_dir, now_dir, now_dir) ) -from tools import my_utils import traceback +sys.path.append(now_dir) import shutil import pdb import gradio as gr from subprocess import Popen import signal -from config import python_exec,infer_device,is_half,exp_root,webui_port_main,webui_port_infer_tts,webui_port_uvr5,webui_port_subfix,is_share -from tools.i18n.i18n import I18nAuto +from config import python_exec,infer_device,is_half,exp_root,webui_port_main,webui_port_infer_tts,webui_port_uvr5,webui_port_subfix +from i18n.i18n import I18nAuto i18n = I18nAuto() from scipy.io import wavfile from tools.my_utils import load_audio @@ -125,7 +119,7 @@ def kill_process(pid): def change_label(if_label,path_list): global p_label if(if_label==True and p_label==None): - cmd = '"%s" tools/subfix_webui.py --load_list "%s" --webui_port %s --is_share %s'%(python_exec,path_list,webui_port_subfix,is_share) + cmd = '"%s" tools/subfix_webui.py --load_list "%s" --webui_port %s'%(python_exec,path_list,webui_port_subfix) yield i18n("打标工具WebUI已开启") print(cmd) p_label = Popen(cmd, shell=True) @@ -137,7 +131,7 @@ def change_label(if_label,path_list): def change_uvr5(if_uvr5): global p_uvr5 if(if_uvr5==True and p_uvr5==None): - cmd = '"%s" tools/uvr5/webui.py "%s" %s %s %s'%(python_exec,infer_device,is_half,webui_port_uvr5,is_share) + cmd = '"%s" tools/uvr5/webui.py "%s" %s %s'%(python_exec,infer_device,is_half,webui_port_uvr5) yield i18n("UVR5已开启") print(cmd) p_uvr5 = Popen(cmd, shell=True) @@ -156,7 +150,6 @@ def change_tts_inference(if_tts,bert_path,cnhubert_base_path,gpu_number,gpt_path os.environ["_CUDA_VISIBLE_DEVICES"]=gpu_number os.environ["is_half"]=str(is_half) os.environ["infer_ttswebui"]=str(webui_port_infer_tts) - os.environ["is_share"]=str(is_share) cmd = '"%s" GPT_SoVITS/inference_webui.py'%(python_exec) yield i18n("TTS推理进程已开启") print(cmd) @@ -171,21 +164,21 @@ def open_asr(asr_inp_dir): global p_asr if(p_asr==None): cmd = '"%s" tools/damo_asr/cmd-asr.py "%s"'%(python_exec,asr_inp_dir) - yield "ASR任务开启:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("ASR任务开启:%s")%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_asr = Popen(cmd, shell=True) p_asr.wait() p_asr=None - yield "ASR任务完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("ASR任务完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的ASR任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("已有正在进行的ASR任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close_asr(): global p_asr if(p_asr!=None): kill_process(p_asr.pid) p_asr=None - return "已终止ASR进程",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return i18n("已终止ASR进程"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} p_train_SoVITS=None def open1Ba(batch_size,total_epoch,exp_name,text_low_lr_rate,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers1Ba,pretrained_s2G,pretrained_s2D): @@ -212,21 +205,21 @@ def open1Ba(batch_size,total_epoch,exp_name,text_low_lr_rate,if_save_latest,if_s with open(tmp_config_path,"w")as f:f.write(json.dumps(data)) cmd = '"%s" GPT_SoVITS/s2_train.py --config "%s"'%(python_exec,tmp_config_path) - yield "SoVITS训练开始:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("SoVITS训练开始:%s")%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_train_SoVITS = Popen(cmd, shell=True) p_train_SoVITS.wait() p_train_SoVITS=None - yield "SoVITS训练完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("SoVITS训练完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close1Ba(): global p_train_SoVITS if(p_train_SoVITS!=None): kill_process(p_train_SoVITS.pid) p_train_SoVITS=None - return "已终止SoVITS训练",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return i18n("已终止SoVITS训练"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} p_train_GPT=None def open1Bb(batch_size,total_epoch,exp_name,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers,pretrained_s1): @@ -255,34 +248,32 @@ def open1Bb(batch_size,total_epoch,exp_name,if_save_latest,if_save_every_weights with open(tmp_config_path, "w") as f:f.write(yaml.dump(data, default_flow_style=False)) # cmd = '"%s" GPT_SoVITS/s1_train.py --config_file "%s" --train_semantic_path "%s/6-name2semantic.tsv" --train_phoneme_path "%s/2-name2text.txt" --output_dir "%s/logs_s1"'%(python_exec,tmp_config_path,s1_dir,s1_dir,s1_dir) cmd = '"%s" GPT_SoVITS/s1_train.py --config_file "%s" '%(python_exec,tmp_config_path) - yield "GPT训练开始:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("GPT训练开始:%s")%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_train_GPT = Popen(cmd, shell=True) p_train_GPT.wait() p_train_GPT=None - yield "GPT训练完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("GPT训练完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的GPT训练任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("已有正在进行的GPT训练任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close1Bb(): global p_train_GPT if(p_train_GPT!=None): kill_process(p_train_GPT.pid) p_train_GPT=None - return "已终止GPT训练",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return i18n("已终止GPT训练"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} ps_slice=[] def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_max,alpha,n_parts): global ps_slice - inp = my_utils.clean_path(inp) - opt_root = my_utils.clean_path(opt_root) if(os.path.exists(inp)==False): - yield "输入路径不存在",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("输入路径不存在"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} return if os.path.isfile(inp):n_parts=1 elif os.path.isdir(inp):pass else: - yield "输入路径存在但既不是文件也不是文件夹",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("输入路径存在但既不是文件也不是文件夹"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} return if (ps_slice == []): for i_part in range(n_parts): @@ -290,13 +281,13 @@ def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_k print(cmd) p = Popen(cmd, shell=True) ps_slice.append(p) - yield "切割执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("切割执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps_slice: p.wait() ps_slice=[] - yield "切割结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("切割结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的切割任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的切割任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close_slice(): global ps_slice @@ -307,7 +298,7 @@ def close_slice(): except: traceback.print_exc() ps_slice=[] - return "已终止所有切割进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有切割进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1a=[] def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): @@ -337,7 +328,7 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): print(cmd) p = Popen(cmd, shell=True) ps1a.append(p) - yield "文本进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("文本进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1a: p.wait() opt = [] @@ -350,9 +341,9 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): with open(path_text, "w", encoding="utf8") as f: f.write("\n".join(opt) + "\n") ps1a=[] - yield "文本进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("文本进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的文本任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的文本任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1a(): global ps1a @@ -363,7 +354,7 @@ def close1a(): except: traceback.print_exc() ps1a=[] - return "已终止所有1a进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有1a进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1b=[] def open1b(inp_text,inp_wav_dir,exp_name,gpu_numbers,ssl_pretrained_dir): @@ -392,13 +383,13 @@ def open1b(inp_text,inp_wav_dir,exp_name,gpu_numbers,ssl_pretrained_dir): print(cmd) p = Popen(cmd, shell=True) ps1b.append(p) - yield "SSL提取进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("SSL提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1b: p.wait() ps1b=[] - yield "SSL提取进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("SSL提取进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的SSL提取任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的SSL提取任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1b(): global ps1b @@ -409,7 +400,7 @@ def close1b(): except: traceback.print_exc() ps1b=[] - return "已终止所有1b进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有1b进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1c=[] def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): @@ -439,7 +430,7 @@ def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): print(cmd) p = Popen(cmd, shell=True) ps1c.append(p) - yield "语义token提取进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("语义token提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1c: p.wait() opt = ["item_name semantic_audio"] @@ -452,9 +443,9 @@ def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): with open(path_semantic, "w", encoding="utf8") as f: f.write("\n".join(opt) + "\n") ps1c=[] - yield "语义token提取进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("语义token提取进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的语义token提取任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的语义token提取任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1c(): global ps1c @@ -465,7 +456,7 @@ def close1c(): except: traceback.print_exc() ps1c=[] - return "已终止所有语义token进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有语义token进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} #####inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numbers1c,bert_pretrained_dir,cnhubert_base_dir,pretrained_s2G ps1abc=[] def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numbers1c,bert_pretrained_dir,ssl_pretrained_dir,pretrained_s2G_path): @@ -499,7 +490,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield "进度:1a-ing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("进度:1a-ing"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() opt = [] @@ -511,7 +502,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb with open(path_text, "w",encoding="utf8") as f: f.write("\n".join(opt) + "\n") - yield "进度:1a-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("进度:1a-done"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc=[] #############################1b config={ @@ -536,9 +527,9 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield "进度:1a-done, 1b-ing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("进度:1a-done, 1b-ing"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() - yield "进度:1a1b-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("进度:1a1b-done"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc=[] #############################1c path_semantic = "%s/6-name2semantic.tsv" % opt_dir @@ -565,7 +556,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield "进度:1a1b-done, 1cing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("进度:1a1b-done, 1cing"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() opt = ["item_name semantic_audio"] @@ -576,15 +567,15 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb os.remove(semantic_path) with open(path_semantic, "w",encoding="utf8") as f: f.write("\n".join(opt) + "\n") - yield "进度:all-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("进度:all-done"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc = [] - yield "一键三连进程结束", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + yield i18n("一键三连进程结束"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} except: traceback.print_exc() close1abc() - yield "一键三连中途报错", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + yield i18n("一键三连中途报错"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} else: - yield "已有正在进行的一键三连任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的一键三连任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1abc(): global ps1abc @@ -595,12 +586,13 @@ def close1abc(): except: traceback.print_exc() ps1abc=[] - return "已终止所有一键三连进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有一键三连进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} with gr.Blocks(title="GPT-SoVITS WebUI") as app: gr.Markdown( - value= + value=i18n( i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.") + ) ) with gr.Tabs(): with gr.TabItem(i18n("0-前置数据集获取工具")):#提前随机切片防止uvr5爆内存->uvr5->slicer->asr->打标 @@ -650,7 +642,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: close_asr_button.click(close_asr, [], [asr_info,open_asr_button,close_asr_button]) open_slicer_button.click(open_slice, [slice_inp_path,slice_opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_max,alpha,n_process], [slicer_info,open_slicer_button,close_slicer_button]) close_slicer_button.click(close_slice, [], [slicer_info,open_slicer_button,close_slicer_button]) - with gr.TabItem(i18n("1-GPT-SoVITS-TTS")): + with gr.TabItem("1-GPT-SoVITS-TTS"): with gr.Row(): exp_name = gr.Textbox(label=i18n("*实验/模型名"), value="xxx", interactive=True) gpu_info = gr.Textbox(label=i18n("显卡信息"), value=gpu_info, visible=True, interactive=False) @@ -665,9 +657,9 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: label=i18n("*训练集音频文件目录"), # value=r"D:\RVC1006\GPT-SoVITS\raw\xxx", interactive=True, - placeholder=i18n("训练集音频文件目录-拼接-list文件里波形对应的文件名(不是全路径)。") + placeholder=i18n("训练集音频文件目录 拼接 list文件里波形对应的文件名。") ) - gr.Markdown(value=i18n("1Aa-文本内容")) + gr.Markdown(value="1Aa-文本内容") with gr.Row(): gpu_numbers1a = gr.Textbox(label=i18n("GPU卡号以-分割,每个卡号一个进程"),value="%s-%s"%(gpus,gpus),interactive=True) bert_pretrained_dir = gr.Textbox(label=i18n("预训练的中文BERT模型路径"),value="GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",interactive=False) @@ -705,7 +697,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: with gr.Row(): batch_size = gr.Slider(minimum=1,maximum=40,step=1,label=i18n("每张显卡的batch_size"),value=default_batch_size,interactive=True) total_epoch = gr.Slider(minimum=1,maximum=20,step=1,label=i18n("总训练轮数total_epoch,不建议太高"),value=8,interactive=True) - text_low_lr_rate = gr.Slider(minimum=0.2,maximum=0.6,step=0.05,label=i18n("文本模块学习率权重"),value=0.4,interactive=True) + text_low_lr_rate = gr.Slider(minimum=0.2,maximum=0.6,step=0.05,label="文本模块学习率权重",value=0.4,interactive=True) save_every_epoch = gr.Slider(minimum=1,maximum=50,step=1,label=i18n("保存频率save_every_epoch"),value=4,interactive=True) if_save_latest = gr.Checkbox(label=i18n("是否仅保存最新的ckpt文件以节省硬盘空间"), value=True, interactive=True, show_label=True) if_save_every_weights = gr.Checkbox(label=i18n("是否在每次保存时间点将最终小模型保存至weights文件夹"), value=True, interactive=True, show_label=True) @@ -746,7 +738,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: app.queue(concurrency_count=511, max_size=1022).launch( server_name="0.0.0.0", inbrowser=True, - share=is_share, + share=True, server_port=webui_port_main, quiet=True, ) From 191f27f699f53d6f27e1f6f74c2f36371730b773 Mon Sep 17 00:00:00 2001 From: Rice Cake Date: Mon, 22 Jan 2024 20:24:45 +0800 Subject: [PATCH 02/16] Add files via upload --- i18n/locale/en_US.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/locale/en_US.json b/i18n/locale/en_US.json index 160f103..b7ea99a 100644 --- a/i18n/locale/en_US.json +++ b/i18n/locale/en_US.json @@ -3,7 +3,7 @@ "UVR5已开启": "UVR5 opened ", "UVR5已关闭": "UVR5 closed", "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible.
If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory Agreement-LICENSE.txt for details.", - "0-前置数据集获取工具": "0-Fech dataset", + "0-前置数据集获取工具": "0-Fetch dataset", "0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-UVR5 webui (for vocal separation, deecho, dereverb and denoise)", "是否开启UVR5-WebUI": "Open UVR5-WebUI", "UVR5进程输出信息": "UVR5 process output log", @@ -128,7 +128,7 @@ "已终止所有一键三连进程": "All one-clicking formatting tasks has been stopped", "已终止所有切割进程": "All audio slicing tasks has been stopped", "已终止所有语义token进程": "All semantics token tasks has been stopped", - "按中文句号。切": "按中文句号。切", + "按中文句号。切": "Slice by Chinese punct", "文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "Text slicer tool, since there will be issues when infering long texts, so it is advised to cut first. When infering, it will infer respectively then combined together.", "文本进程执行中": "Text processing", "文本进程结束": "Finished text processing", From 40603d00c2d37df2f170a1519e3e1a594a8702b4 Mon Sep 17 00:00:00 2001 From: Rice Cake Date: Mon, 22 Jan 2024 20:25:13 +0800 Subject: [PATCH 03/16] Add files via upload --- tools/uvr5/webui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/uvr5/webui.py b/tools/uvr5/webui.py index 1ede1b4..71e7ebc 100644 --- a/tools/uvr5/webui.py +++ b/tools/uvr5/webui.py @@ -119,7 +119,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format with gr.Blocks(title="RVC WebUI") as app: gr.Markdown( value= - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE." + i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.") ) with gr.Tabs(): with gr.TabItem(i18n("伴奏人声分离&去混响&去回声")): @@ -144,7 +144,7 @@ with gr.Blocks(title="RVC WebUI") as app: minimum=0, maximum=20, step=1, - label="人声提取激进程度", + label=i18n("人声提取激进程度"), value=10, interactive=True, visible=False, # 先不开放调整 From 20e7be87c6d8a7a6375681f954048b80a2dcf889 Mon Sep 17 00:00:00 2001 From: Rice Cake Date: Mon, 22 Jan 2024 20:35:46 +0800 Subject: [PATCH 04/16] Add files via upload --- webui.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/webui.py b/webui.py index e23353c..4eaf901 100644 --- a/webui.py +++ b/webui.py @@ -1,3 +1,6 @@ +import os,shutil,sys,pdb +now_dir = os.getcwd() +sys.path.append(now_dir) import json,yaml,warnings,torch import platform import psutil @@ -11,6 +14,12 @@ now_dir = os.getcwd() tmp = os.path.join(now_dir, "TEMP") os.makedirs(tmp, exist_ok=True) os.environ["TEMP"] = tmp +if(os.path.exists(tmp)): + for name in os.listdir(tmp): + if(name=="jieba.cache"):continue + path="%s/%s"%(tmp,name) + delete=os.remove if os.path.isfile(path) else shutil.rmtree + delete(path) import site site_packages_roots = [] for path in site.getsitepackages(): @@ -26,14 +35,14 @@ for site_packages_root in site_packages_roots: "%s\n%s/tools\n%s/tools/damo_asr\n%s/GPT_SoVITS\n%s/tools/uvr5" % (now_dir, now_dir, now_dir, now_dir, now_dir) ) +from tools import my_utils import traceback -sys.path.append(now_dir) import shutil import pdb import gradio as gr from subprocess import Popen import signal -from config import python_exec,infer_device,is_half,exp_root,webui_port_main,webui_port_infer_tts,webui_port_uvr5,webui_port_subfix +from config import python_exec,infer_device,is_half,exp_root,webui_port_main,webui_port_infer_tts,webui_port_uvr5,webui_port_subfix,is_share from i18n.i18n import I18nAuto i18n = I18nAuto() from scipy.io import wavfile @@ -119,7 +128,7 @@ def kill_process(pid): def change_label(if_label,path_list): global p_label if(if_label==True and p_label==None): - cmd = '"%s" tools/subfix_webui.py --load_list "%s" --webui_port %s'%(python_exec,path_list,webui_port_subfix) + cmd = '"%s" tools/subfix_webui.py --load_list "%s" --webui_port %s --is_share %s'%(python_exec,path_list,webui_port_subfix,is_share) yield i18n("打标工具WebUI已开启") print(cmd) p_label = Popen(cmd, shell=True) @@ -131,7 +140,7 @@ def change_label(if_label,path_list): def change_uvr5(if_uvr5): global p_uvr5 if(if_uvr5==True and p_uvr5==None): - cmd = '"%s" tools/uvr5/webui.py "%s" %s %s'%(python_exec,infer_device,is_half,webui_port_uvr5) + cmd = '"%s" tools/uvr5/webui.py "%s" %s %s %s'%(python_exec,infer_device,is_half,webui_port_uvr5,is_share) yield i18n("UVR5已开启") print(cmd) p_uvr5 = Popen(cmd, shell=True) @@ -150,6 +159,7 @@ def change_tts_inference(if_tts,bert_path,cnhubert_base_path,gpu_number,gpt_path os.environ["_CUDA_VISIBLE_DEVICES"]=gpu_number os.environ["is_half"]=str(is_half) os.environ["infer_ttswebui"]=str(webui_port_infer_tts) + os.environ["is_share"]=str(is_share) cmd = '"%s" GPT_SoVITS/inference_webui.py'%(python_exec) yield i18n("TTS推理进程已开启") print(cmd) @@ -267,6 +277,8 @@ def close1Bb(): ps_slice=[] def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_max,alpha,n_parts): global ps_slice + inp = my_utils.clean_path(inp) + opt_root = my_utils.clean_path(opt_root) if(os.path.exists(inp)==False): yield i18n("输入路径不存在"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} return @@ -588,11 +600,10 @@ def close1abc(): ps1abc=[] return i18n("已终止所有一键三连进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} -with gr.Blocks(title="GPT-SoVITS WebUI") as app: +with gr.Blocks(title=i18n("GPT-SoVITS WebUI")) as app: gr.Markdown( - value=i18n( + value= i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.") - ) ) with gr.Tabs(): with gr.TabItem(i18n("0-前置数据集获取工具")):#提前随机切片防止uvr5爆内存->uvr5->slicer->asr->打标 @@ -657,9 +668,9 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: label=i18n("*训练集音频文件目录"), # value=r"D:\RVC1006\GPT-SoVITS\raw\xxx", interactive=True, - placeholder=i18n("训练集音频文件目录 拼接 list文件里波形对应的文件名。") + placeholder=i18n("训练集音频文件目录-拼接-list文件里波形对应的文件名(不是全路径)。") ) - gr.Markdown(value="1Aa-文本内容") + gr.Markdown(value=i18n("1Aa-文本内容")) with gr.Row(): gpu_numbers1a = gr.Textbox(label=i18n("GPU卡号以-分割,每个卡号一个进程"),value="%s-%s"%(gpus,gpus),interactive=True) bert_pretrained_dir = gr.Textbox(label=i18n("预训练的中文BERT模型路径"),value="GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",interactive=False) @@ -697,7 +708,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: with gr.Row(): batch_size = gr.Slider(minimum=1,maximum=40,step=1,label=i18n("每张显卡的batch_size"),value=default_batch_size,interactive=True) total_epoch = gr.Slider(minimum=1,maximum=20,step=1,label=i18n("总训练轮数total_epoch,不建议太高"),value=8,interactive=True) - text_low_lr_rate = gr.Slider(minimum=0.2,maximum=0.6,step=0.05,label="文本模块学习率权重",value=0.4,interactive=True) + text_low_lr_rate = gr.Slider(minimum=0.2,maximum=0.6,step=0.05,label=i18n("文本模块学习率权重"),value=0.4,interactive=True) save_every_epoch = gr.Slider(minimum=1,maximum=50,step=1,label=i18n("保存频率save_every_epoch"),value=4,interactive=True) if_save_latest = gr.Checkbox(label=i18n("是否仅保存最新的ckpt文件以节省硬盘空间"), value=True, interactive=True, show_label=True) if_save_every_weights = gr.Checkbox(label=i18n("是否在每次保存时间点将最终小模型保存至weights文件夹"), value=True, interactive=True, show_label=True) From 8deb526b5b5ff2e147fdfa4b546a46f63c42df2c Mon Sep 17 00:00:00 2001 From: Rice Cake Date: Mon, 22 Jan 2024 20:40:44 +0800 Subject: [PATCH 05/16] update i18n --- webui.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webui.py b/webui.py index 4eaf901..ebd1dc7 100644 --- a/webui.py +++ b/webui.py @@ -4,13 +4,10 @@ sys.path.append(now_dir) import json,yaml,warnings,torch import platform import psutil -import os import signal warnings.filterwarnings("ignore") torch.manual_seed(233333) -import os,pdb,sys -now_dir = os.getcwd() tmp = os.path.join(now_dir, "TEMP") os.makedirs(tmp, exist_ok=True) os.environ["TEMP"] = tmp @@ -43,7 +40,7 @@ import gradio as gr from subprocess import Popen import signal from config import python_exec,infer_device,is_half,exp_root,webui_port_main,webui_port_infer_tts,webui_port_uvr5,webui_port_subfix,is_share -from i18n.i18n import I18nAuto +from tools.i18n.i18n import I18nAuto i18n = I18nAuto() from scipy.io import wavfile from tools.my_utils import load_audio @@ -653,7 +650,7 @@ with gr.Blocks(title=i18n("GPT-SoVITS WebUI")) as app: close_asr_button.click(close_asr, [], [asr_info,open_asr_button,close_asr_button]) open_slicer_button.click(open_slice, [slice_inp_path,slice_opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_max,alpha,n_process], [slicer_info,open_slicer_button,close_slicer_button]) close_slicer_button.click(close_slice, [], [slicer_info,open_slicer_button,close_slicer_button]) - with gr.TabItem("1-GPT-SoVITS-TTS"): + with gr.TabItem(i18n("1-GPT-SoVITS-TTS")): with gr.Row(): exp_name = gr.Textbox(label=i18n("*实验/模型名"), value="xxx", interactive=True) gpu_info = gr.Textbox(label=i18n("显卡信息"), value=gpu_info, visible=True, interactive=False) @@ -749,7 +746,7 @@ with gr.Blocks(title=i18n("GPT-SoVITS WebUI")) as app: app.queue(concurrency_count=511, max_size=1022).launch( server_name="0.0.0.0", inbrowser=True, - share=True, + share=is_share, server_port=webui_port_main, quiet=True, ) From e61136f144836f53f45a571fb76cf9a490906bef Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:52:04 +0800 Subject: [PATCH 06/16] Update my_utils.py --- tools/my_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/my_utils.py b/tools/my_utils.py index abb2a44..ce61984 100644 --- a/tools/my_utils.py +++ b/tools/my_utils.py @@ -1,4 +1,4 @@ -import platform +import platform,os import ffmpeg import numpy as np From 38245a2baa533d75cfaf78682e2a831f3dd14605 Mon Sep 17 00:00:00 2001 From: Yuan-Man <68322456+Yuan-ManX@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:57:53 +0800 Subject: [PATCH 07/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 127aebf..7649d7b 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ sudo apt-get install python3.9-distutils #### Pip Packages ```bash -pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet transformers +pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet transformers jieba ``` #### Additional Requirements From 1dba692448c55542a7e01e3c1ad615ec70f2fd60 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Mon, 22 Jan 2024 21:52:48 +0800 Subject: [PATCH 08/16] Delete GPT_SoVITS/prepare_datasets/0-pipeline.py --- GPT_SoVITS/prepare_datasets/0-pipeline.py | 81 ----------------------- 1 file changed, 81 deletions(-) delete mode 100644 GPT_SoVITS/prepare_datasets/0-pipeline.py diff --git a/GPT_SoVITS/prepare_datasets/0-pipeline.py b/GPT_SoVITS/prepare_datasets/0-pipeline.py deleted file mode 100644 index 4979ed2..0000000 --- a/GPT_SoVITS/prepare_datasets/0-pipeline.py +++ /dev/null @@ -1,81 +0,0 @@ -import os, torch, sys -from subprocess import Popen - -now_dir = os.getcwd() -sys.path.append(now_dir) -from config import ( - text_path, - wav_dir, - n_card, - exp_name, - n_parts, - exp_dir, -) - -os.makedirs("%s/logs_s1" % exp_dir, exist_ok=True) -os.makedirs("%s/logs_s2" % exp_dir, exist_ok=True) -##############step1 -ps = [] -for i_part in range(n_parts): - cmd = "python prepare/1-get-text.py %s %s %s %s %s %s" % ( - text_path, - wav_dir, - exp_name, - i_part, - n_parts, - i_part % n_card, - ) - print(cmd) - p = Popen(cmd, shell=True) - ps.append(p) -for p in ps: - p.wait() - -opt = [] -for i_part in range(n_parts): - txt_path = "%s/2-name2text-%s.txt" % (exp_dir, i_part) - with open(txt_path, "r") as f: - opt += f.read().strip("\n").split("\n") - os.remove(txt_path) -with open("%s/2-name2text.txt" % exp_dir, "w") as f: - f.write("\n".join(opt) + "\n") - -############step2 -ps = [] -for i_part in range(n_parts): - cmd = "python prepare/2-get-hubert-wav32k.py %s %s %s %s %s %s" % ( - text_path, - wav_dir, - exp_name, - i_part, - n_parts, - i_part % n_card, - ) - print(cmd) - p = Popen(cmd, shell=True) - ps.append(p) -for p in ps: - p.wait() -#############step3 -ps = [] -for i_part in range(n_parts): - cmd = "python prepare/3-get-semantic.py %s %s %s %s %s" % ( - text_path, - exp_name, - i_part, - n_parts, - i_part % n_card, - ) - print(cmd) - p = Popen(cmd, shell=True) - ps.append(p) -for p in ps: - p.wait() -opt = ["item_name semantic_audio"] -for i_part in range(n_parts): - semantic_path = "%s/6-name2semantic-%s.tsv" % (exp_dir, i_part) - with open(semantic_path, "r") as f: - opt += f.read().strip("\n").split("\n") - os.remove(semantic_path) -with open("%s/6-name2semantic.tsv" % exp_dir, "w") as f: - f.write("\n".join(opt) + "\n") From 65ee0385363ee19e1751b75c6e52cbd61c076836 Mon Sep 17 00:00:00 2001 From: koji Date: Mon, 22 Jan 2024 09:34:47 -0500 Subject: [PATCH 09/16] fix typo in jp doc --- docs/ja/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ja/README.md b/docs/ja/README.md index 1e7eebf..d58d090 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -24,7 +24,7 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb ## 機能: -1. **セロショット TTS:** 5秒間のボーカルサンプルを入力すると、即座にテキストから音声に変換されます。 +1. **ゼロショット TTS:** 5秒間のボーカルサンプルを入力すると、即座にテキストから音声に変換されます。 2. **数ショット TTS:** わずか1分間のトレーニングデータでモデルを微調整し、音声の類似性とリアリズムを向上。 From c1a24ad37079252da7a9ee1e87038ef285bf8fac Mon Sep 17 00:00:00 2001 From: Shouta Yoshikai Date: Tue, 23 Jan 2024 00:10:39 +0900 Subject: [PATCH 10/16] update ja_JP.json update webui.py for i18n --- i18n/locale/ja_JP.json | 159 ++++++++++++++++++++++++++++++++++++++++- tools/uvr5/webui.py | 2 +- webui.py | 82 ++++++++++----------- 3 files changed, 198 insertions(+), 45 deletions(-) diff --git a/i18n/locale/ja_JP.json b/i18n/locale/ja_JP.json index c5b33ff..03143d1 100644 --- a/i18n/locale/ja_JP.json +++ b/i18n/locale/ja_JP.json @@ -111,12 +111,12 @@ "输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "処理対象音声フォルダーのパスを入力してください(エクスプローラーのアドレスバーからコピーしてください)", "输入待处理音频文件路径(默认是正确格式示例)": "処理対象音声ファイルのパスを入力してください(デフォルトは正しいフォーマットの例です)", "输入源音量包络替换输出音量包络融合比例,越靠近1越使用输出包络": "入力ソースの音量エンベロープと出力音量エンベロープの融合率 1に近づくほど、出力音量エンベロープの割合が高くなる", - "输入监听": "输入监听", + "输入监听": "入力を監視", "输入训练文件夹路径": "トレーニング用フォルダのパスを入力してください", "输入设备": "入力デバイス", "输入降噪": "入力ノイズの低減", "输出信息": "出力情報", - "输出变声": "输出变声", + "输出变声": "音声変換の出力", "输出设备": "出力デバイス", "输出降噪": "出力ノイズの低減", "输出音频(右下角三个点,点了可以下载)": "出力音声(右下の三点をクリックしてダウンロードできます)", @@ -131,5 +131,158 @@ "音调设置": "音程設定", "音频设备(请使用同种类驱动)": "オーディオデバイス(同じ種類のドライバーを使用してください)", "音高算法": "ピッチアルゴリズム", - "额外推理时长": "追加推論時間" + "额外推理时长": "追加推論時間", + "打标工具WebUI已开启": "ラベリングツールWebUIが開始されました", + "打标工具WebUI已关闭": "ラベリングツールWebUIが終了しました", + "UVR5已开启": "UVR5が開始されました", + "UVR5已关闭": "UVR5が終了しました", + "TTS推理进程已开启": "TTS推論プロセスが開始されました", + "TTS推理进程已关闭": "TTS推理プロセスが終了しました", + "ASR任务开启": "ASRタスクが開始されました", + "ASR任务完成": "ASRタスクが完了しました", + "已有正在进行的ASR任务,需先终止才能开启下一次任务": "既に進行中のASRタスクがあります。新たなタスクを開始する前に終了させてください", + "已终止ASR进程": "ASRプロセスが終了しました", + "SoVITS训练开始": "SoVITSのトレーニングが開始されました", + "SoVITS训练完成": "SoVITSのトレーニングが完了しました", + "已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务": "既に進行中のSoVITSのトレーニングタスクがあります。新たなタスクを開始する前に終了させてください", + "已终止SoVITS训练": "SoVITSのトレーニングが終了しました", + "GPT训练开始": "GPTトレーニング開始", + "GPT训练完成": "GPTトレーニング完了", + "已有正在进行的GPT训练任务,需先终止才能开启下一次任务": "既に進行中のGPTトレーニングタスクがあります。新たなタスクを開始する前に終了させてください", + "已终止GPT训练": "GPTトレーニングが終了しました", + "切割执行中": "カット中", + "切割结束": "カット終了", + "已有正在进行的切割任务,需先终止才能开启下一次任务": "既に進行中のカットタスクがあります。新たなタスクを開始する前に終了させてください", + "已终止所有切割进程": "すべてのカットプロセスが終了しました", + "文本进程执行中": "テキストプロセス実行中", + "文本进程结束": "テキストプロセス終了", + "已有正在进行的文本任务,需先终止才能开启下一次任务": "既に進行中のテキストタスクがあります。新たなタスクを開始する前に終了させてください", + "已终止所有文本进程": "すべてのテキストプロセスが終了しました", + "SSL提取进程执行中": "SSL抽出プロセス実行中", + "SSL提取进程结束": "SSL抽出プロセス終了", + "已有正在进行的SSL提取任务,需先终止才能开启下一次任务": "既に進行中のSSL抽出タスクがあります。新たなタスクを開始する前に終了させてください", + "已终止所有1b进程": "すべての1bプロセスが終了しました", + "语义token提取进程执行中": "意味トークン抽出プロセス実行中", + "语义token提取进程结束": "意味トークン抽出プロセス終了", + "已有正在进行的语义token提取任务,需先终止才能开启下一次任务": "既に進行中の意味トークン抽出タスクがあります。新たなタスクを開始する前に終了させてください", + "已终止所有语义token进程": "すべての意味トークンプロセスが終了しました", + "语义token提取进程已开始": "意味トークン抽出プロセスが開始されました", + "语义token提取进程已结束": "意味トークン抽出プロセスが終了しました", + "语义token提取进程已终止": "意味トークン抽出プロセスが終了しました", + "语义token提取进程正在进行中": "意味トークン抽出プロセスが進行中です", + "语义token提取任务已完成": "意味トークン抽出タスクが完了しました", + "语义token提取任务正在进行中": "意味トークン抽出タスクが進行中です", + "语义token提取任务已开始": "意味トークン抽出タスクが開始されました", + "语义token提取任务已终止": "意味トークン抽出タスクが終了しました", + "ワンクリックで三つのプロセスを開始": "ワンクリックで三つのプロセスを開始します", + "ワンクリックで三つのプロセスを終了": "ワンクリックで三つのプロセスを終了します", + "ワンクリックで三つのプロセスを中止": "ワンクリックで三つのプロセスを中止します", + "ワンクリックで三つのプロセスが進行中": "ワンクリックで三つのプロセスが進行中です", + "ワンクリックで三つのタスクが完了": "ワンクリックで三つのタスクが完了しました", + "ワンクリックで三つのタスクが進行中": "ワンクリックで三つのタスクが進行中です", + "ワンクリックで三つのタスクを開始": "ワンクリックで三つのタスクを開始します", + "ワンクリックで三つのタスクを中止": "ワンクリックで三つのタスクを中止します", + "0-前置数据集获取工具": "0-前置データセット取得ツール", + "0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-UVR5ボーカル伴奏分離&リバーブディレイ除去ツール", + "是否开启UVR5-WebUI": "UVR5-WebUIを開始しますか", + "UVR5进程输出信息": "UVR5プロセス出力情報", + "0b-语音切分工具": "0b-音声切断ツール", + "音频自动切分输入路径,可文件可文件夹": "オーディオ自動切断入力パス、ファイルまたはフォルダー可", + "切分后的子音频的输出根目录": "切断後のサブオーディオの出力ルートディレクトリ", + "threshold:音量小于这个值视作静音的备选切割点": "threshold:音量がこの値より小さい場合は、サイレントと見なされる代替切断点", + "min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length:各セクションの最小長さ、最初のセクションが短すぎる場合は、この値を超えるまで後続のセクションと連続しています", + "min_interval:最短切割间隔": "min_interval:最短切断間隔", + "hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop_size:音量曲線の計算方法、小さいほど精度が高く計算量が多くなります(精度が高いほど効果が良いとは限りません)", + "max_sil_kept:切完后静音最多留多长": "max_sil_kept:切断後のサイレントの最大保持長", + "开启语音切割": "音声切断を開始", + "终止语音切割": "音声切断を終了", + "max:归一化后最大值多少": "max:正規化後の最大値", + "alpha_mix:混多少比例归一化后音频进来": "alpha_mix:どの程度の割合で正規化後のオーディオを混合するか", + "切割使用的进程数": "切断に使用されるプロセス数", + "语音切割进程输出信息": "音声切断プロセス出力情報", + "0c-中文批量离线ASR工具": "0c-中国語バッチオフラインASRツール", + "开启离线批量ASR": "オフラインバッチASRを開始", + "终止ASR进程": "ASRプロセスを終了", + "批量ASR(中文only)输入文件夹路径": "バッチASR(中国語のみ)入力フォルダパス", + "ASR进程输出信息": "ASRプロセス出力情報", + "0d-语音文本校对标注工具": "0d-音声テキスト校正アノテーションツール", + "是否开启打标WebUI": "ラベリングWebUIを開始しますか", + "打标数据标注文件路径": "ラベリングデータアノテーションファイルパス", + "打标工具进程输出信息": "ラベリングツールプロセス出力情報", + "文本进程结束, SSL提取进程执行中": "テキストプロセス終了、SSL抽出プロセス実行中", + "文本进程结束, SSL提取进程结束": "テキストプロセス終了、SSL抽出プロセス終了", + "一键三连进程执行中": "ワンクリック三連プロセス実行中", + "一键三连进程结束": "ワンクリック三連プロセス終了", + "SoVITS训练进程执行中": "SoVITS訓練プロセス実行中", + "SoVITS训练进程结束": "SoVITS訓練プロセス終了", + "GPT训练进程执行中": "GPT訓練プロセス実行中", + "GPT训练进程结束": "GPT訓練プロセス終了", + "推理进程执行中": "推論プロセス実行中", + "推理进程结束": "推論プロセス終了", + "预训练的SoVITS-G模型路径": "事前学習済みのSoVITS-Gモデルのパス", + "预训练的SoVITS-D模型路径": "事前学習済みのSoVITS-Dモデルのパス", + "预训练的GPT模型路径": "事前学習済みのGPTモデルのパス", + "GPU卡号以-分割,每个卡号一个进程": "GPUカード番号は-で区切り、各カード番号に1つのプロセス", + "预训练的中文BERT模型路径": "事前学習済みの中国語BERTモデルのパス", + "开启文本获取": "テキスト取得を開始", + "终止文本获取进程": "テキスト取得プロセスを終了", + "文本进程输出信息": "テキストプロセス出力情報", + "预训练的SSL模型路径": "事前学習済みのSSLモデルのパス", + "开启SSL提取": "SSL抽出を開始", + "终止SSL提取进程": "SSL抽出プロセスを終了", + "SSL进程输出信息": "SSLプロセス出力情報", + "开启语义token提取": "セマンティックトークン抽出を開始", + "终止语义token提取进程": "セマンティックトークン抽出プロセスを終了", + "语义token提取进程输出信息": "セマンティックトークン抽出プロセス出力情報", + "开启一键三连": "ワンクリック三連を開始", + "终止一键三连": "ワンクリック三連を終了", + "一键三连进程输出信息": "ワンクリック三連プロセス出力情報", + "1A-訓練集格式化工具": "1A-トレーニングセットフォーマットツール", + "输出logs/实验名目录下应有23456开头的文件和文件夹": "logs/実験名ディレクトリには、23456で始まるファイルとフォルダが存在する必要があります", + "*文本标注文件": "*テキストアノテーションファイル", + "*训练集音频文件目录": "*トレーニングセットオーディオファイルディレクトリ", + "训练集音频文件目录-拼接-list文件里波形对应的文件名(不是全路径)。": "トレーニングセットオーディオファイルディレクトリ-結合-listファイル内の波形に対応するファイル名(フルパスではありません)。", + "1Aa-文本内容": "1Aa-テキスト内容", + "1Ac-语义token提取": "1Ac-セマンティックトークン抽出", + "1Aabc-训练集格式化一键三连": "1Aabc-トレーニングセットフォーマットワンクリック三連", + "1B-微调训练": "1B-微調整訓練", + "1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-SoVITS訓練。共有モデルファイルはSoVITS_weightsに出力されます。", + "1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-GPT訓練。共有モデルファイルはGPT_weightsに出力されます。", + "1C-推理": "1C-推論", + "2-GPT-SoVITS-变声": "2-GPT-SoVITS-ボイスチェンジ", + "开启SoVITS训练": "SoVITS訓練を開始", + "终止SoVITS训练": "SoVITS訓練を終了", + "SoVITS训练进程输出信息": "SoVITS訓練プロセス出力情報", + "开启GPT训练": "GPT訓練を開始", + "终止GPT训练": "GPT訓練を終了", + "GPT训练进程输出信息": "GPT訓練プロセス出力情報", + "是否开启TTS推理WebUI": "TTS推理WebUIを開始しますか", + "TTS推理WebUI进程输出信息": "TTS推理WebUIプロセス出力情報", + "施工中,请静候佳音": "工事中、お待ちください", + "*实验/模型名": "実験/モデル名", + "1A-训练集格式化工具": "1A-トレーニングセットフォーマットツール", + "1Ab-SSL自监督特征提取": "1Ab-SSL自己監督による特徴抽出", + "总训练轮数total_epoch,不建议太高": "トータルトレーニングラウンド数total_epoch、あまり高く設定しないことをお勧めします", + "文本模块学习率权重": "テキストモジュールの学習率の重み", + "选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模,体验5秒Zero Shot TTS用。": "SoVITS_weightsとGPT_weightsに保存された訓練済みモデルを選択します。デフォルトの1つはベースモデルで、5秒間のZero Shot TTSを体験するために使用されます。", + "*GPT模型列表": "*GPTモデルリスト", + "*SoVITS模型列表": "*SoVITSモデルリスト", + "GPU卡号,只能填1个整数": "GPUカード番号、整数のみ入力可能", + "刷新模型路径": "モデルパスを更新", + "*请上传并填写参考信息": "*参考情報をアップロードして記入してください", + "请上传参考音频": "*参考音声をアップロードしてください", + "参考音频的文本": "*参考音声のテキスト", + "参考音频的语种": "参考音声の言語", + "*请填写需要合成的目标文本": "*合成する目標テキストを入力してください", + "需要合成的文本": "*合成するテキスト", + "需要合成的语种": "*合成する言語", + "合成语音": "音声合成", + "输出的语音": "*出力音声", + "文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "テキスト分割ツール。長すぎるテキストを合成すると結果が必ずしも良くない可能性があるため、長すぎる場合は先に切ることをお勧めします。合成はテキストの改行に基づいて分割してから再結合します。", + "需要合成的切分前文本": "合成する前の分割テキストが必要", + "凑五句一切": "五文を一つにまとめる", + "凑50字一切": "50文字を一つにまとめる", + "按中文句号。切": "中国語の句点で切る。", + "切分后文本": "分割後のテキスト", + "后续将支持混合语种编码文本输入。": "今後、混合言語エンコードテキストの入力をサポートします。" } diff --git a/tools/uvr5/webui.py b/tools/uvr5/webui.py index 1ede1b4..17603e0 100644 --- a/tools/uvr5/webui.py +++ b/tools/uvr5/webui.py @@ -119,7 +119,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format with gr.Blocks(title="RVC WebUI") as app: gr.Markdown( value= - "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE." + i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.") ) with gr.Tabs(): with gr.TabItem(i18n("伴奏人声分离&去混响&去回声")): diff --git a/webui.py b/webui.py index 60c6e1b..386cfa0 100644 --- a/webui.py +++ b/webui.py @@ -171,21 +171,21 @@ def open_asr(asr_inp_dir): global p_asr if(p_asr==None): cmd = '"%s" tools/damo_asr/cmd-asr.py "%s"'%(python_exec,asr_inp_dir) - yield "ASR任务开启:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield f"{i18n('ASR任务开启')}:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_asr = Popen(cmd, shell=True) p_asr.wait() p_asr=None - yield "ASR任务完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("ASR任务完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的ASR任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield f"{i18n('已有正在进行的ASR任务,需先终止才能开启下一次任务')}",{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close_asr(): global p_asr if(p_asr!=None): kill_process(p_asr.pid) p_asr=None - return "已终止ASR进程",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return i18n("已终止ASR进程"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} p_train_SoVITS=None def open1Ba(batch_size,total_epoch,exp_name,text_low_lr_rate,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers1Ba,pretrained_s2G,pretrained_s2D): @@ -212,21 +212,21 @@ def open1Ba(batch_size,total_epoch,exp_name,text_low_lr_rate,if_save_latest,if_s with open(tmp_config_path,"w")as f:f.write(json.dumps(data)) cmd = '"%s" GPT_SoVITS/s2_train.py --config "%s"'%(python_exec,tmp_config_path) - yield "SoVITS训练开始:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("SoVITS训练开始:%s"%cmd),{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_train_SoVITS = Popen(cmd, shell=True) p_train_SoVITS.wait() p_train_SoVITS=None - yield "SoVITS训练完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("SoVITS训练完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield f"{i18n('已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务')}",{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close1Ba(): global p_train_SoVITS if(p_train_SoVITS!=None): kill_process(p_train_SoVITS.pid) p_train_SoVITS=None - return "已终止SoVITS训练",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return i18n("已终止SoVITS训练"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} p_train_GPT=None def open1Bb(batch_size,total_epoch,exp_name,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers,pretrained_s1): @@ -255,21 +255,21 @@ def open1Bb(batch_size,total_epoch,exp_name,if_save_latest,if_save_every_weights with open(tmp_config_path, "w") as f:f.write(yaml.dump(data, default_flow_style=False)) # cmd = '"%s" GPT_SoVITS/s1_train.py --config_file "%s" --train_semantic_path "%s/6-name2semantic.tsv" --train_phoneme_path "%s/2-name2text.txt" --output_dir "%s/logs_s1"'%(python_exec,tmp_config_path,s1_dir,s1_dir,s1_dir) cmd = '"%s" GPT_SoVITS/s1_train.py --config_file "%s" '%(python_exec,tmp_config_path) - yield "GPT训练开始:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield f"{i18n('GPT训练开始')}:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_train_GPT = Popen(cmd, shell=True) p_train_GPT.wait() p_train_GPT=None - yield "GPT训练完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("GPT训练完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的GPT训练任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield i18n("已有正在进行的GPT训练任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close1Bb(): global p_train_GPT if(p_train_GPT!=None): kill_process(p_train_GPT.pid) p_train_GPT=None - return "已终止GPT训练",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return i18n("已终止GPT训练"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} ps_slice=[] def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_max,alpha,n_parts): @@ -277,12 +277,12 @@ def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_k inp = my_utils.clean_path(inp) opt_root = my_utils.clean_path(opt_root) if(os.path.exists(inp)==False): - yield "输入路径不存在",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("输入路径不存在"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} return if os.path.isfile(inp):n_parts=1 elif os.path.isdir(inp):pass else: - yield "输入路径存在但既不是文件也不是文件夹",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("输入路径存在但既不是文件也不是文件夹"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} return if (ps_slice == []): for i_part in range(n_parts): @@ -290,13 +290,13 @@ def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_k print(cmd) p = Popen(cmd, shell=True) ps_slice.append(p) - yield "切割执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("切割执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps_slice: p.wait() ps_slice=[] - yield "切割结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("切割结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的切割任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的切割任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close_slice(): global ps_slice @@ -307,7 +307,7 @@ def close_slice(): except: traceback.print_exc() ps_slice=[] - return "已终止所有切割进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有切割进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1a=[] def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): @@ -337,7 +337,7 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): print(cmd) p = Popen(cmd, shell=True) ps1a.append(p) - yield "文本进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("文本进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1a: p.wait() opt = [] @@ -350,9 +350,9 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): with open(path_text, "w", encoding="utf8") as f: f.write("\n".join(opt) + "\n") ps1a=[] - yield "文本进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("文本进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的文本任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的文本任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1a(): global ps1a @@ -363,7 +363,7 @@ def close1a(): except: traceback.print_exc() ps1a=[] - return "已终止所有1a进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有文本进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1b=[] def open1b(inp_text,inp_wav_dir,exp_name,gpu_numbers,ssl_pretrained_dir): @@ -392,13 +392,13 @@ def open1b(inp_text,inp_wav_dir,exp_name,gpu_numbers,ssl_pretrained_dir): print(cmd) p = Popen(cmd, shell=True) ps1b.append(p) - yield "SSL提取进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("SSL提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1b: p.wait() ps1b=[] - yield "SSL提取进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("SSL提取进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的SSL提取任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的SSL提取任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1b(): global ps1b @@ -409,7 +409,7 @@ def close1b(): except: traceback.print_exc() ps1b=[] - return "已终止所有1b进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有1b进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1c=[] def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): @@ -439,7 +439,7 @@ def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): print(cmd) p = Popen(cmd, shell=True) ps1c.append(p) - yield "语义token提取进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("语义token提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1c: p.wait() opt = ["item_name semantic_audio"] @@ -452,9 +452,9 @@ def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): with open(path_semantic, "w", encoding="utf8") as f: f.write("\n".join(opt) + "\n") ps1c=[] - yield "语义token提取进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield i18n("语义token提取进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield "已有正在进行的语义token提取任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的语义token提取任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1c(): global ps1c @@ -465,7 +465,7 @@ def close1c(): except: traceback.print_exc() ps1c=[] - return "已终止所有语义token进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有语义token进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} #####inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numbers1c,bert_pretrained_dir,cnhubert_base_dir,pretrained_s2G ps1abc=[] def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numbers1c,bert_pretrained_dir,ssl_pretrained_dir,pretrained_s2G_path): @@ -499,11 +499,11 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield "进度:1a-ing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("文本进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() opt = [] - for i_part in range(all_parts):#txt_path="%s/2-name2text-%s.txt"%(opt_dir,i_part) + for i_part in range(all_parts): txt_path = "%s/2-name2text-%s.txt" % (opt_dir, i_part) with open(txt_path, "r",encoding="utf8") as f: opt += f.read().strip("\n").split("\n") @@ -511,7 +511,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb with open(path_text, "w",encoding="utf8") as f: f.write("\n".join(opt) + "\n") - yield "进度:1a-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("文本进程结束"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc=[] #############################1b config={ @@ -536,9 +536,9 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield "进度:1a-done, 1b-ing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("文本进程结束, SSL提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() - yield "进度:1a1b-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("文本进程结束, SSL提取进程结束"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc=[] #############################1c path_semantic = "%s/6-name2semantic.tsv" % opt_dir @@ -565,7 +565,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield "进度:1a1b-done, 1cing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("SSL提取进程结束, 语义token提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() opt = ["item_name semantic_audio"] @@ -576,15 +576,15 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb os.remove(semantic_path) with open(path_semantic, "w",encoding="utf8") as f: f.write("\n".join(opt) + "\n") - yield "进度:all-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("语义token提取进程结束"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc = [] - yield "一键三连进程结束", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + yield i18n("一键三连进程结束"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} except: traceback.print_exc() close1abc() - yield "一键三连中途报错", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + yield i18n("一键三连中途报错"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} else: - yield "已有正在进行的一键三连任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield i18n("已有正在进行的一键三连任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1abc(): global ps1abc @@ -595,7 +595,7 @@ def close1abc(): except: traceback.print_exc() ps1abc=[] - return "已终止所有一键三连进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return i18n("已终止所有一键三连进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} with gr.Blocks(title="GPT-SoVITS WebUI") as app: gr.Markdown( From 34b4e02092566ef1c7b56d88b5efb29503c16073 Mon Sep 17 00:00:00 2001 From: Yuan-Man <68322456+Yuan-ManX@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:19:09 +0800 Subject: [PATCH 11/16] Update README.md --- docs/cn/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cn/README.md b/docs/cn/README.md index 4c7f530..27c5668 100644 --- a/docs/cn/README.md +++ b/docs/cn/README.md @@ -51,7 +51,7 @@ bash install.sh #### Pip包 ```bash -pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet +pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet transformers ``` #### 额外要求 From 9e56f2b6b0d4c30c27416ae48ac4487b33733ef8 Mon Sep 17 00:00:00 2001 From: Yuan-Man <68322456+Yuan-ManX@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:22:03 +0800 Subject: [PATCH 12/16] Update README.md --- docs/ja/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ja/README.md b/docs/ja/README.md index 1e7eebf..34c673b 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -57,7 +57,7 @@ sudo apt-get install python3.9-distutils #### Pip パッケージ ```bash -pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet +pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet transformers ``` #### 追加要件 From 872134c846bcb8f1909a3f5aff68a6aa67643f68 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:26:18 +0800 Subject: [PATCH 13/16] Update t2s_model.py --- GPT_SoVITS/AR/models/t2s_model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GPT_SoVITS/AR/models/t2s_model.py b/GPT_SoVITS/AR/models/t2s_model.py index 9f8330b..083dc09 100644 --- a/GPT_SoVITS/AR/models/t2s_model.py +++ b/GPT_SoVITS/AR/models/t2s_model.py @@ -302,6 +302,8 @@ class Text2SemanticDecoder(nn.Module): xy_dec[:, -1] ) ##不用改,如果用了cache的默认就是只有一帧,取最后一帧一样的 # samples = topk_sampling(logits, top_k=top_k, top_p=1.0, temperature=temperature) + if(idx==0):###第一次跑不能EOS否则没有了 + logits = logits[:, :-1] ###刨除1024终止符号的概率 samples = sample( logits[0], y, top_k=top_k, top_p=1.0, repetition_penalty=1.35 )[0].unsqueeze(0) From 7bd33f9c8b8892497ec642f1297f9139c2bca107 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Mon, 22 Jan 2024 23:42:33 +0800 Subject: [PATCH 14/16] Add files via upload --- webui.py | 94 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/webui.py b/webui.py index ebd1dc7..1520226 100644 --- a/webui.py +++ b/webui.py @@ -171,21 +171,21 @@ def open_asr(asr_inp_dir): global p_asr if(p_asr==None): cmd = '"%s" tools/damo_asr/cmd-asr.py "%s"'%(python_exec,asr_inp_dir) - yield i18n("ASR任务开启:%s")%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield "ASR任务开启:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_asr = Popen(cmd, shell=True) p_asr.wait() p_asr=None - yield i18n("ASR任务完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "ASR任务完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的ASR任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield "已有正在进行的ASR任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close_asr(): global p_asr if(p_asr!=None): kill_process(p_asr.pid) p_asr=None - return i18n("已终止ASR进程"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return "已终止ASR进程",{"__type__":"update","visible":True},{"__type__":"update","visible":False} p_train_SoVITS=None def open1Ba(batch_size,total_epoch,exp_name,text_low_lr_rate,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers1Ba,pretrained_s2G,pretrained_s2D): @@ -212,21 +212,21 @@ def open1Ba(batch_size,total_epoch,exp_name,text_low_lr_rate,if_save_latest,if_s with open(tmp_config_path,"w")as f:f.write(json.dumps(data)) cmd = '"%s" GPT_SoVITS/s2_train.py --config "%s"'%(python_exec,tmp_config_path) - yield i18n("SoVITS训练开始:%s")%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield "SoVITS训练开始:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_train_SoVITS = Popen(cmd, shell=True) p_train_SoVITS.wait() p_train_SoVITS=None - yield i18n("SoVITS训练完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "SoVITS训练完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield "已有正在进行的SoVITS训练任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close1Ba(): global p_train_SoVITS if(p_train_SoVITS!=None): kill_process(p_train_SoVITS.pid) p_train_SoVITS=None - return i18n("已终止SoVITS训练"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return "已终止SoVITS训练",{"__type__":"update","visible":True},{"__type__":"update","visible":False} p_train_GPT=None def open1Bb(batch_size,total_epoch,exp_name,if_save_latest,if_save_every_weights,save_every_epoch,gpu_numbers,pretrained_s1): @@ -255,21 +255,21 @@ def open1Bb(batch_size,total_epoch,exp_name,if_save_latest,if_save_every_weights with open(tmp_config_path, "w") as f:f.write(yaml.dump(data, default_flow_style=False)) # cmd = '"%s" GPT_SoVITS/s1_train.py --config_file "%s" --train_semantic_path "%s/6-name2semantic.tsv" --train_phoneme_path "%s/2-name2text.txt" --output_dir "%s/logs_s1"'%(python_exec,tmp_config_path,s1_dir,s1_dir,s1_dir) cmd = '"%s" GPT_SoVITS/s1_train.py --config_file "%s" '%(python_exec,tmp_config_path) - yield i18n("GPT训练开始:%s")%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield "GPT训练开始:%s"%cmd,{"__type__":"update","visible":False},{"__type__":"update","visible":True} print(cmd) p_train_GPT = Popen(cmd, shell=True) p_train_GPT.wait() p_train_GPT=None - yield i18n("GPT训练完成"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "GPT训练完成",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的GPT训练任务,需先终止才能开启下一次任务"),{"__type__":"update","visible":False},{"__type__":"update","visible":True} + yield "已有正在进行的GPT训练任务,需先终止才能开启下一次任务",{"__type__":"update","visible":False},{"__type__":"update","visible":True} def close1Bb(): global p_train_GPT if(p_train_GPT!=None): kill_process(p_train_GPT.pid) p_train_GPT=None - return i18n("已终止GPT训练"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + return "已终止GPT训练",{"__type__":"update","visible":True},{"__type__":"update","visible":False} ps_slice=[] def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_max,alpha,n_parts): @@ -277,12 +277,12 @@ def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_k inp = my_utils.clean_path(inp) opt_root = my_utils.clean_path(opt_root) if(os.path.exists(inp)==False): - yield i18n("输入路径不存在"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "输入路径不存在",{"__type__":"update","visible":True},{"__type__":"update","visible":False} return if os.path.isfile(inp):n_parts=1 elif os.path.isdir(inp):pass else: - yield i18n("输入路径存在但既不是文件也不是文件夹"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "输入路径存在但既不是文件也不是文件夹",{"__type__":"update","visible":True},{"__type__":"update","visible":False} return if (ps_slice == []): for i_part in range(n_parts): @@ -290,13 +290,13 @@ def open_slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_k print(cmd) p = Popen(cmd, shell=True) ps_slice.append(p) - yield i18n("切割执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "切割执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps_slice: p.wait() ps_slice=[] - yield i18n("切割结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "切割结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的切割任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "已有正在进行的切割任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close_slice(): global ps_slice @@ -307,7 +307,7 @@ def close_slice(): except: traceback.print_exc() ps_slice=[] - return i18n("已终止所有切割进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return "已终止所有切割进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1a=[] def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): @@ -337,7 +337,7 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): print(cmd) p = Popen(cmd, shell=True) ps1a.append(p) - yield i18n("文本进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "文本进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1a: p.wait() opt = [] @@ -350,9 +350,9 @@ def open1a(inp_text,inp_wav_dir,exp_name,gpu_numbers,bert_pretrained_dir): with open(path_text, "w", encoding="utf8") as f: f.write("\n".join(opt) + "\n") ps1a=[] - yield i18n("文本进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "文本进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的文本任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "已有正在进行的文本任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1a(): global ps1a @@ -363,7 +363,7 @@ def close1a(): except: traceback.print_exc() ps1a=[] - return i18n("已终止所有1a进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return "已终止所有1a进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1b=[] def open1b(inp_text,inp_wav_dir,exp_name,gpu_numbers,ssl_pretrained_dir): @@ -392,13 +392,13 @@ def open1b(inp_text,inp_wav_dir,exp_name,gpu_numbers,ssl_pretrained_dir): print(cmd) p = Popen(cmd, shell=True) ps1b.append(p) - yield i18n("SSL提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "SSL提取进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1b: p.wait() ps1b=[] - yield i18n("SSL提取进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "SSL提取进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的SSL提取任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "已有正在进行的SSL提取任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1b(): global ps1b @@ -409,7 +409,7 @@ def close1b(): except: traceback.print_exc() ps1b=[] - return i18n("已终止所有1b进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return "已终止所有1b进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} ps1c=[] def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): @@ -439,10 +439,10 @@ def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): print(cmd) p = Popen(cmd, shell=True) ps1c.append(p) - yield i18n("语义token提取进程执行中"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "语义token提取进程执行中", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1c: p.wait() - opt = ["item_name semantic_audio"] + opt = ["item_name\tsemantic_audio"] path_semantic = "%s/6-name2semantic.tsv" % opt_dir for i_part in range(all_parts): semantic_path = "%s/6-name2semantic-%s.tsv" % (opt_dir, i_part) @@ -452,9 +452,9 @@ def open1c(inp_text,exp_name,gpu_numbers,pretrained_s2G_path): with open(path_semantic, "w", encoding="utf8") as f: f.write("\n".join(opt) + "\n") ps1c=[] - yield i18n("语义token提取进程结束"),{"__type__":"update","visible":True},{"__type__":"update","visible":False} + yield "语义token提取进程结束",{"__type__":"update","visible":True},{"__type__":"update","visible":False} else: - yield i18n("已有正在进行的语义token提取任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "已有正在进行的语义token提取任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1c(): global ps1c @@ -465,7 +465,7 @@ def close1c(): except: traceback.print_exc() ps1c=[] - return i18n("已终止所有语义token进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return "已终止所有语义token进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} #####inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numbers1c,bert_pretrained_dir,cnhubert_base_dir,pretrained_s2G ps1abc=[] def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numbers1c,bert_pretrained_dir,ssl_pretrained_dir,pretrained_s2G_path): @@ -475,7 +475,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb try: #############################1a path_text="%s/2-name2text.txt" % opt_dir - if(os.path.exists(path_text)==False or (os.path.exists(path_text)==True and os.path.getsize(path_text)<10)): + if(os.path.exists(path_text)==False or (os.path.exists(path_text)==True and len(open(path_text,"r",encoding="utf8").read().strip("\n").split("\n"))<2)): config={ "inp_text":inp_text, "inp_wav_dir":inp_wav_dir, @@ -499,7 +499,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield i18n("进度:1a-ing"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "进度:1a-ing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() opt = [] @@ -511,7 +511,7 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb with open(path_text, "w",encoding="utf8") as f: f.write("\n".join(opt) + "\n") - yield i18n("进度:1a-done"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "进度:1a-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc=[] #############################1b config={ @@ -536,9 +536,9 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield i18n("进度:1a-done, 1b-ing"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "进度:1a-done, 1b-ing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() - yield i18n("进度:1a1b-done"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "进度:1a1b-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc=[] #############################1c path_semantic = "%s/6-name2semantic.tsv" % opt_dir @@ -565,10 +565,10 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb print(cmd) p = Popen(cmd, shell=True) ps1abc.append(p) - yield i18n("进度:1a1b-done, 1cing"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "进度:1a1b-done, 1cing", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} for p in ps1abc:p.wait() - opt = ["item_name semantic_audio"] + opt = ["item_name\tsemantic_audio"] for i_part in range(all_parts): semantic_path = "%s/6-name2semantic-%s.tsv" % (opt_dir, i_part) with open(semantic_path, "r",encoding="utf8") as f: @@ -576,15 +576,15 @@ def open1abc(inp_text,inp_wav_dir,exp_name,gpu_numbers1a,gpu_numbers1Ba,gpu_numb os.remove(semantic_path) with open(path_semantic, "w",encoding="utf8") as f: f.write("\n".join(opt) + "\n") - yield i18n("进度:all-done"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "进度:all-done", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} ps1abc = [] - yield i18n("一键三连进程结束"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + yield "一键三连进程结束", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} except: traceback.print_exc() close1abc() - yield i18n("一键三连中途报错"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + yield "一键三连中途报错", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} else: - yield i18n("已有正在进行的一键三连任务,需先终止才能开启下一次任务"), {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} + yield "已有正在进行的一键三连任务,需先终止才能开启下一次任务", {"__type__": "update", "visible": False}, {"__type__": "update", "visible": True} def close1abc(): global ps1abc @@ -595,9 +595,9 @@ def close1abc(): except: traceback.print_exc() ps1abc=[] - return i18n("已终止所有一键三连进程"), {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} + return "已终止所有一键三连进程", {"__type__": "update", "visible": True}, {"__type__": "update", "visible": False} -with gr.Blocks(title=i18n("GPT-SoVITS WebUI")) as app: +with gr.Blocks(title="GPT-SoVITS WebUI") as app: gr.Markdown( value= i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责.
如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.") @@ -704,9 +704,9 @@ with gr.Blocks(title=i18n("GPT-SoVITS WebUI")) as app: gr.Markdown(value=i18n("1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。")) with gr.Row(): batch_size = gr.Slider(minimum=1,maximum=40,step=1,label=i18n("每张显卡的batch_size"),value=default_batch_size,interactive=True) - total_epoch = gr.Slider(minimum=1,maximum=20,step=1,label=i18n("总训练轮数total_epoch,不建议太高"),value=8,interactive=True) + total_epoch = gr.Slider(minimum=1,maximum=25,step=1,label=i18n("总训练轮数total_epoch,不建议太高"),value=8,interactive=True) text_low_lr_rate = gr.Slider(minimum=0.2,maximum=0.6,step=0.05,label=i18n("文本模块学习率权重"),value=0.4,interactive=True) - save_every_epoch = gr.Slider(minimum=1,maximum=50,step=1,label=i18n("保存频率save_every_epoch"),value=4,interactive=True) + save_every_epoch = gr.Slider(minimum=1,maximum=25,step=1,label=i18n("保存频率save_every_epoch"),value=4,interactive=True) if_save_latest = gr.Checkbox(label=i18n("是否仅保存最新的ckpt文件以节省硬盘空间"), value=True, interactive=True, show_label=True) if_save_every_weights = gr.Checkbox(label=i18n("是否在每次保存时间点将最终小模型保存至weights文件夹"), value=True, interactive=True, show_label=True) gpu_numbers1Ba = gr.Textbox(label=i18n("GPU卡号以-分割,每个卡号一个进程"), value="%s" % (gpus), interactive=True) @@ -717,7 +717,7 @@ with gr.Blocks(title=i18n("GPT-SoVITS WebUI")) as app: gr.Markdown(value=i18n("1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。")) with gr.Row(): batch_size1Bb = gr.Slider(minimum=1,maximum=40,step=1,label=i18n("每张显卡的batch_size"),value=default_batch_size,interactive=True) - total_epoch1Bb = gr.Slider(minimum=2,maximum=100,step=1,label=i18n("总训练轮数total_epoch"),value=15,interactive=True) + total_epoch1Bb = gr.Slider(minimum=2,maximum=50,step=1,label=i18n("总训练轮数total_epoch"),value=15,interactive=True) if_save_latest1Bb = gr.Checkbox(label=i18n("是否仅保存最新的ckpt文件以节省硬盘空间"), value=True, interactive=True, show_label=True) if_save_every_weights1Bb = gr.Checkbox(label=i18n("是否在每次保存时间点将最终小模型保存至weights文件夹"), value=True, interactive=True, show_label=True) save_every_epoch1Bb = gr.Slider(minimum=1,maximum=50,step=1,label=i18n("保存频率save_every_epoch"),value=5,interactive=True) From 810a031fd01275f567c8fc74d3afd8d71ed2f8e0 Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Tue, 23 Jan 2024 00:11:28 +0800 Subject: [PATCH 15/16] Update Changelog_CN.md --- docs/cn/Changelog_CN.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/cn/Changelog_CN.md b/docs/cn/Changelog_CN.md index 71d3c72..abb61f1 100644 --- a/docs/cn/Changelog_CN.md +++ b/docs/cn/Changelog_CN.md @@ -12,14 +12,13 @@ 6-在参考音频结尾留空0.3s,削弱合成音频包含参考音频结尾的问题 -待修复: +### 20240122更新 -1-过短输出文件返回重复参考音频的问题 +1-修复过短输出文件返回重复参考音频的问题。 -2-batch size超过条数导致微调有问题 +2-经测试,英文日文训练原生支持(日文训练需要根目录不含非英文等特殊字符)。 -3-hubert提取在half下出现nan概率更高的问题 +3-音频路径检查。如果尝试读取输入错的路径报错路径不存在,而非ffmpeg错误。 -高优: +待修复:-hubert提取在half下出现nan概率更高的问题 -支持英文日文训练 From 948e7fc086dc68310ff09b2a897233cffb609f1b Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:30:49 +0800 Subject: [PATCH 16/16] Update Changelog_CN.md --- docs/cn/Changelog_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cn/Changelog_CN.md b/docs/cn/Changelog_CN.md index abb61f1..589b0f6 100644 --- a/docs/cn/Changelog_CN.md +++ b/docs/cn/Changelog_CN.md @@ -10,7 +10,7 @@ 5-清理TEMP文件夹缓存音频等文件 -6-在参考音频结尾留空0.3s,削弱合成音频包含参考音频结尾的问题 +6-大幅削弱合成音频包含参考音频结尾的问题 ### 20240122更新