Blane187 commited on
Commit
5c7e52f
·
verified ·
1 Parent(s): 64cc8a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -76,16 +76,12 @@ with gr.Blocks(title="RVC UI") as app:
76
  gr.Markdown("### Step 2. Audio processing. \n#### 1. Slicing.\nAutomatically traverse all files in the training folder that can be decoded into audio and perform slice normalization. Generates 2 wav folders in the experiment directory. Currently, only single-singer/speaker training is supported.")
77
  trainset_dir4 = gr.Textbox(label="Enter the path of the training folder")
78
  spk_id5 = gr.Slider(minimum=0, maximum=4, step=1, label="Please specify the speaker/singer ID", value=0, interactive=True)
79
- but1 = gr.Button("Process data", variant="primary")
80
- info1 = gr.Textbox(label="Output information", value="")
81
  #but1.click(preprocess_dataset,[trainset_dir4, exp_dir1, sr2, np7],[info1],api_name="train_preprocess")
82
  gr.Markdown("#### 2. Feature extraction.\nUse CPU to extract pitch (if the model has pitch), use GPU to extract features (select GPU index).")
83
  #gpu_info9 = gr.Textbox(label="GPU Information",value=gpu_info,visible=F0GPUVisible)
84
  #gpus6 = gr.Textbox(label="Enter the GPU index(es) separated by '-', e.g., 0-1-2 to use GPU 0, 1, and 2",value=gpus,interactive=True,visible=F0GPUVisible)
85
  #gpus_rmvpe = gr.Textbox(label="Enter the GPU index(es) separated by '-', e.g., 0-0-1 to use 2 processes in GPU0 and 1 process in GPU1",value="%s-%s" % (gpus, gpus),interactive=True,visible=F0GPUVisible)
86
  f0method8 = gr.Radio(label="Select the pitch extraction algorithm: when extracting singing, you can use 'pm' to speed up. For high-quality speech with fast performance, but worse CPU usage, you can use 'dio'. 'harvest' results in better quality but is slower. 'rmvpe' has the best results and consumes less CPU/GPU", choices=["pm", "harvest", "dio", "rmvpe", "rmvpe_gpu"], value="rmvpe_gpu", interactive=True)
87
- but2 = gr.Button("Feature extraction", variant="primary")
88
- info2 = gr.Textbox(label="Output information", value="")
89
  #f0method8.change(fn=change_f0_method,inputs=[f0method8],outputs=[gpus_rmvpe])
90
  #but2.click(extract_f0_feature,[gpus6,np7,f0method8,if_f0_3,exp_dir1,version19,gpus_rmvpe,],[info2],api_name="train_extract_f0_feature")
91
  gr.Markdown("### Step 3. Start training.\nFill in the training settings and start training the model and index.")
@@ -101,9 +97,13 @@ with gr.Blocks(title="RVC UI") as app:
101
  #sr2.change(change_sr2,[sr2, if_f0_3, version19],[pretrained_G14, pretrained_D15])
102
  #version19.change(change_version19,[sr2, if_f0_3, version19],[pretrained_G14, pretrained_D15, sr2])
103
  #if_f0_3.change(fn=lambda: None, inputs=[if_f0_3, sr2, version19], outputs=[f0method8, gpus_rmvpe, pretrained_G14, pretrained_D15])
 
 
104
  but3 = gr.Button("Train model", variant="primary")
105
  but4 = gr.Button("Train feature index", variant="primary")
106
  but5 = gr.Button("One-click training", variant="primary")
 
 
107
  #info3 = gr.Textbox(label=i18n("Output information"), value="")
108
  #but3.click(click_train,[exp_dir1,sr2,if_f0_3,spk_id5,save_epoch10,total_epoch11,batch_size12,if_save_latest13,pretrained_G14,pretrained_D15,gpus16,if_cache_gpu17,if_save_every_weights18,version19,author,],info3,api_name="train_start")
109
  #but4.click(train_index, [exp_dir1, version19], info3)
 
76
  gr.Markdown("### Step 2. Audio processing. \n#### 1. Slicing.\nAutomatically traverse all files in the training folder that can be decoded into audio and perform slice normalization. Generates 2 wav folders in the experiment directory. Currently, only single-singer/speaker training is supported.")
77
  trainset_dir4 = gr.Textbox(label="Enter the path of the training folder")
78
  spk_id5 = gr.Slider(minimum=0, maximum=4, step=1, label="Please specify the speaker/singer ID", value=0, interactive=True)
 
 
79
  #but1.click(preprocess_dataset,[trainset_dir4, exp_dir1, sr2, np7],[info1],api_name="train_preprocess")
80
  gr.Markdown("#### 2. Feature extraction.\nUse CPU to extract pitch (if the model has pitch), use GPU to extract features (select GPU index).")
81
  #gpu_info9 = gr.Textbox(label="GPU Information",value=gpu_info,visible=F0GPUVisible)
82
  #gpus6 = gr.Textbox(label="Enter the GPU index(es) separated by '-', e.g., 0-1-2 to use GPU 0, 1, and 2",value=gpus,interactive=True,visible=F0GPUVisible)
83
  #gpus_rmvpe = gr.Textbox(label="Enter the GPU index(es) separated by '-', e.g., 0-0-1 to use 2 processes in GPU0 and 1 process in GPU1",value="%s-%s" % (gpus, gpus),interactive=True,visible=F0GPUVisible)
84
  f0method8 = gr.Radio(label="Select the pitch extraction algorithm: when extracting singing, you can use 'pm' to speed up. For high-quality speech with fast performance, but worse CPU usage, you can use 'dio'. 'harvest' results in better quality but is slower. 'rmvpe' has the best results and consumes less CPU/GPU", choices=["pm", "harvest", "dio", "rmvpe", "rmvpe_gpu"], value="rmvpe_gpu", interactive=True)
 
 
85
  #f0method8.change(fn=change_f0_method,inputs=[f0method8],outputs=[gpus_rmvpe])
86
  #but2.click(extract_f0_feature,[gpus6,np7,f0method8,if_f0_3,exp_dir1,version19,gpus_rmvpe,],[info2],api_name="train_extract_f0_feature")
87
  gr.Markdown("### Step 3. Start training.\nFill in the training settings and start training the model and index.")
 
97
  #sr2.change(change_sr2,[sr2, if_f0_3, version19],[pretrained_G14, pretrained_D15])
98
  #version19.change(change_version19,[sr2, if_f0_3, version19],[pretrained_G14, pretrained_D15, sr2])
99
  #if_f0_3.change(fn=lambda: None, inputs=[if_f0_3, sr2, version19], outputs=[f0method8, gpus_rmvpe, pretrained_G14, pretrained_D15])
100
+ but1 = gr.Button("Process data", variant="primary")
101
+ but2 = gr.Button("Feature extraction", variant="primary")
102
  but3 = gr.Button("Train model", variant="primary")
103
  but4 = gr.Button("Train feature index", variant="primary")
104
  but5 = gr.Button("One-click training", variant="primary")
105
+ info1 = gr.Textbox(label="Output information", value="")
106
+
107
  #info3 = gr.Textbox(label=i18n("Output information"), value="")
108
  #but3.click(click_train,[exp_dir1,sr2,if_f0_3,spk_id5,save_epoch10,total_epoch11,batch_size12,if_save_latest13,pretrained_G14,pretrained_D15,gpus16,if_cache_gpu17,if_save_every_weights18,version19,author,],info3,api_name="train_start")
109
  #but4.click(train_index, [exp_dir1, version19], info3)