nevreal commited on
Commit
9c577b2
·
verified ·
1 Parent(s): 41ab75e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -62
app.py CHANGED
@@ -1113,64 +1113,6 @@ with gr.Blocks(title="RVC WebUI") as app:
1113
  outputs=[spk_item, protect0, protect1, file_index2, file_index4],
1114
  api_name="infer_change_voice",
1115
  )
1116
- with gr.TabItem(i18n("伴奏人声分离&去混响&去回声")):
1117
- with gr.Group():
1118
- gr.Markdown(
1119
- value=i18n(
1120
- "人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声:不带和声的音频选这个,对主人声保留比HP5更好。内置HP2和HP3两个模型,HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点; <br>2、仅保留主人声:带和声的音频选这个,对主人声可能有削弱。内置HP5一个模型; <br> 3、去混响、去延迟模型(by FoxJoy):<br>  (1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底,DeReverb额外去除混响,可去除单声道混响,但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍;<br>2、MDX-Net-Dereverb模型挺慢的;<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。"
1121
- )
1122
- )
1123
- with gr.Row():
1124
- with gr.Column():
1125
- dir_wav_input = gr.Textbox(
1126
- label=i18n("输入待处理音频文件夹路径"),
1127
- placeholder="C:\\Users\\Desktop\\todo-songs",
1128
- )
1129
- wav_inputs = gr.File(
1130
- file_count="multiple",
1131
- label=i18n("也可批量输入音频文件, 二选一, 优先读文件夹"),
1132
- )
1133
- with gr.Column():
1134
- model_choose = gr.Dropdown(
1135
- label=i18n("模型"), choices=uvr5_names
1136
- )
1137
- agg = gr.Slider(
1138
- minimum=0,
1139
- maximum=20,
1140
- step=1,
1141
- label="人声提取激进程度",
1142
- value=10,
1143
- interactive=True,
1144
- visible=False, # 先不开放调整
1145
- )
1146
- opt_vocal_root = gr.Textbox(
1147
- label=i18n("指定输出主人声文件夹"), value="opt"
1148
- )
1149
- opt_ins_root = gr.Textbox(
1150
- label=i18n("指定输出非主人声文件夹"), value="opt"
1151
- )
1152
- format0 = gr.Radio(
1153
- label=i18n("导出文件格式"),
1154
- choices=["wav", "flac", "mp3", "m4a"],
1155
- value="flac",
1156
- interactive=True,
1157
- )
1158
- but2 = gr.Button(i18n("转换"), variant="primary")
1159
- vc_output4 = gr.Textbox(label=i18n("输出信息"))
1160
- but2.click(
1161
- uvr,
1162
- [
1163
- model_choose,
1164
- dir_wav_input,
1165
- opt_vocal_root,
1166
- wav_inputs,
1167
- opt_ins_root,
1168
- agg,
1169
- format0,
1170
- ],
1171
- [vc_output4],
1172
- api_name="uvr_convert",
1173
- )
1174
  with gr.TabItem(i18n("训练")):
1175
  gr.Markdown(
1176
  value=i18n(
@@ -1225,8 +1167,7 @@ with gr.Blocks(title="RVC WebUI") as app:
1225
  value=0,
1226
  interactive=True,
1227
  )
1228
- but1 = gr.Button(i18n("处理数据"), variant="primary")
1229
- info1 = gr.Textbox(label=i18n("输出信息"), value="")
1230
  but1.click(
1231
  preprocess_dataset,
1232
  [trainset_dir4, exp_dir1, sr2, np7],
@@ -1269,8 +1210,7 @@ with gr.Blocks(title="RVC WebUI") as app:
1269
  interactive=True,
1270
  visible=F0GPUVisible,
1271
  )
1272
- but2 = gr.Button(i18n("特征提取"), variant="primary")
1273
- info2 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
1274
  f0method8.change(
1275
  fn=change_f0_method,
1276
  inputs=[f0method8],
@@ -1372,6 +1312,10 @@ with gr.Blocks(title="RVC WebUI") as app:
1372
  value=gpus,
1373
  interactive=True,
1374
  )
 
 
 
 
1375
  but3 = gr.Button(i18n("训练模型"), variant="primary")
1376
  but4 = gr.Button(i18n("训练特征索引"), variant="primary")
1377
  but5 = gr.Button(i18n("一键训练"), variant="primary")
 
1113
  outputs=[spk_item, protect0, protect1, file_index2, file_index4],
1114
  api_name="infer_change_voice",
1115
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1116
  with gr.TabItem(i18n("训练")):
1117
  gr.Markdown(
1118
  value=i18n(
 
1167
  value=0,
1168
  interactive=True,
1169
  )
1170
+
 
1171
  but1.click(
1172
  preprocess_dataset,
1173
  [trainset_dir4, exp_dir1, sr2, np7],
 
1210
  interactive=True,
1211
  visible=F0GPUVisible,
1212
  )
1213
+
 
1214
  f0method8.change(
1215
  fn=change_f0_method,
1216
  inputs=[f0method8],
 
1312
  value=gpus,
1313
  interactive=True,
1314
  )
1315
+ but1 = gr.Button(i18n("处理数据"), variant="primary")
1316
+ info1 = gr.Textbox(label=i18n("输出信息"), value="")
1317
+ but2 = gr.Button(i18n("特征提取"), variant="primary")
1318
+ info2 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
1319
  but3 = gr.Button(i18n("训练模型"), variant="primary")
1320
  but4 = gr.Button(i18n("训练特征索引"), variant="primary")
1321
  but5 = gr.Button(i18n("一键训练"), variant="primary")