mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-04-18 02:29:00 +08:00
fix: resolve inconsistent sample rates and improve Train tab layout
This commit addresses two issues on the Train tab: 1. **Inconsistent Target Sample Rates:** - Resolved an issue where switching versions led to inconsistent Target sample rates. Additionally, it fixes a missing v2 - 40k configuration file. Despite v2 having a 40k pretrained model, configurations were mismatched: - assets/pretrained (32k, 40k, 48k) - assets/pretrained_v2 (32k, 40k, 48k) - configs/v1 (32k, 40k, 48k) - configs/v2 (32k, 48k) - Tests showed that a 40k - v2 setting generated an incorrect 40k - v1 config file. The default settings have been updated to use 48k - v2 to align the sample rates correctly. Now: - v1 will consistently show 32k, 40k, and 48k - v2 will consistently show 32k and 48k **Note:** Ensures that selecting the 40k option for v2 no longer results in an incorrect configuration file, aligning the sample rates across both versions. 2. **Repositioned 'Version' Field:** - Moved the 'Version' field to appear before the 'Target sample rate' field on the Train tab. This improves the logical flow and user experience by ensuring that the 'Version' selection is made before choosing the 'Target sample rate'. Changes: - Updated layout on the Train tab to reposition the 'Version' field. - Ensured that field updates are reflected correctly. **Note:** Aligns with a more intuitive user workflow by ensuring users select the version first before setting the target sample rate. No functional changes to the data processing were made.
This commit is contained in:
parent
85829da3a0
commit
d1aef99916
26
infer-web.py
26
infer-web.py
@ -441,9 +441,9 @@ def change_version19(sr2, if_f0_3, version19):
|
||||
if sr2 == "32k" and version19 == "v1":
|
||||
sr2 = "40k"
|
||||
to_return_sr2 = (
|
||||
{"choices": ["40k", "48k"], "__type__": "update", "value": sr2}
|
||||
{"choices": ["32k", "40k", "48k"], "__type__": "update", "value": sr2}
|
||||
if version19 == "v1"
|
||||
else {"choices": ["40k", "48k", "32k"], "__type__": "update", "value": sr2}
|
||||
else {"choices": ["32k", "48k"], "__type__": "update", "value": sr2}
|
||||
)
|
||||
f0_str = "f0" if if_f0_3 else ""
|
||||
return (
|
||||
@ -1176,10 +1176,17 @@ with gr.Blocks(title="RVC WebUI") as app:
|
||||
)
|
||||
with gr.Row():
|
||||
exp_dir1 = gr.Textbox(label=i18n("输入实验名"), value="mi-test")
|
||||
version19 = gr.Radio(
|
||||
label=i18n("版本"),
|
||||
choices=["v1", "v2"],
|
||||
value="v2",
|
||||
interactive=True,
|
||||
visible=True,
|
||||
)
|
||||
sr2 = gr.Radio(
|
||||
label=i18n("目标采样率"),
|
||||
choices=["40k", "48k"],
|
||||
value="40k",
|
||||
choices=["32k", "48k"],
|
||||
value="48k",
|
||||
interactive=True,
|
||||
)
|
||||
if_f0_3 = gr.Radio(
|
||||
@ -1188,13 +1195,6 @@ with gr.Blocks(title="RVC WebUI") as app:
|
||||
value=True,
|
||||
interactive=True,
|
||||
)
|
||||
version19 = gr.Radio(
|
||||
label=i18n("版本"),
|
||||
choices=["v1", "v2"],
|
||||
value="v2",
|
||||
interactive=True,
|
||||
visible=True,
|
||||
)
|
||||
np7 = gr.Slider(
|
||||
minimum=0,
|
||||
maximum=config.n_cpu,
|
||||
@ -1339,12 +1339,12 @@ with gr.Blocks(title="RVC WebUI") as app:
|
||||
with gr.Row():
|
||||
pretrained_G14 = gr.Textbox(
|
||||
label=i18n("加载预训练底模G路径"),
|
||||
value="assets/pretrained_v2/f0G40k.pth",
|
||||
value="assets/pretrained_v2/f0G48k.pth",
|
||||
interactive=True,
|
||||
)
|
||||
pretrained_D15 = gr.Textbox(
|
||||
label=i18n("加载预训练底模D路径"),
|
||||
value="assets/pretrained_v2/f0D40k.pth",
|
||||
value="assets/pretrained_v2/f0D48k.pth",
|
||||
interactive=True,
|
||||
)
|
||||
sr2.change(
|
||||
|
Loading…
x
Reference in New Issue
Block a user