ozipoetra
commited on
Commit
·
62d077f
1
Parent(s):
e48fdae
yest
Browse files- app.py +4 -4
- lib/vc/vc_infer_pipeline.py +2 -2
app.py
CHANGED
@@ -58,8 +58,8 @@ else:
|
|
58 |
f0method_mode = ["pm", "harvest", "crepe"]
|
59 |
f0method_info = "PM is fast, Harvest is good but extremely slow, Rvmpe is alternative to harvest (might be better), and Crepe effect is good but requires GPU (Default: PM)"
|
60 |
|
61 |
-
if os.path.isfile("assets/
|
62 |
-
f0method_mode.insert(2, "
|
63 |
|
64 |
def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
|
65 |
def vc_fn(
|
@@ -408,7 +408,7 @@ if __name__ == '__main__':
|
|
408 |
tts_text = gr.Textbox(label="TTS text", info="Text to speech input", visible=False)
|
409 |
tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
410 |
with gr.Column():
|
411 |
-
vc_transform0 = gr.Number(label="Transpose", value=
|
412 |
f0method0 = gr.Radio(
|
413 |
label="Pitch extraction algorithm",
|
414 |
info=f0method_info,
|
@@ -447,7 +447,7 @@ if __name__ == '__main__':
|
|
447 |
maximum=1,
|
448 |
label="Volume Envelope",
|
449 |
info="Use the volume envelope of the input to replace or mix with the volume envelope of the output. The closer the ratio is to 1, the more the output envelope is used",
|
450 |
-
value=1,
|
451 |
interactive=True,
|
452 |
)
|
453 |
protect0 = gr.Slider(
|
|
|
58 |
f0method_mode = ["pm", "harvest", "crepe"]
|
59 |
f0method_info = "PM is fast, Harvest is good but extremely slow, Rvmpe is alternative to harvest (might be better), and Crepe effect is good but requires GPU (Default: PM)"
|
60 |
|
61 |
+
if os.path.isfile("assets/rvmpe/rvmpe.pt"):
|
62 |
+
f0method_mode.insert(2, "rvmpe")
|
63 |
|
64 |
def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
|
65 |
def vc_fn(
|
|
|
408 |
tts_text = gr.Textbox(label="TTS text", info="Text to speech input", visible=False)
|
409 |
tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
410 |
with gr.Column():
|
411 |
+
vc_transform0 = gr.Number(label="Transpose", value=12, info='Type "12" to change from male to female voice. Type "-12" to change female to male voice')
|
412 |
f0method0 = gr.Radio(
|
413 |
label="Pitch extraction algorithm",
|
414 |
info=f0method_info,
|
|
|
447 |
maximum=1,
|
448 |
label="Volume Envelope",
|
449 |
info="Use the volume envelope of the input to replace or mix with the volume envelope of the output. The closer the ratio is to 1, the more the output envelope is used",
|
450 |
+
value=0.1,
|
451 |
interactive=True,
|
452 |
)
|
453 |
protect0 = gr.Slider(
|
lib/vc/vc_infer_pipeline.py
CHANGED
@@ -129,11 +129,11 @@ class VC(object):
|
|
129 |
f0 = f0[0].cpu().numpy()
|
130 |
elif f0_method == "rmvpe":
|
131 |
if hasattr(self, "model_rmvpe") == False:
|
132 |
-
from
|
133 |
|
134 |
print("loading rmvpe model")
|
135 |
self.model_rmvpe = RMVPE(
|
136 |
-
os.path.join("assets", "rvmpe", "
|
137 |
)
|
138 |
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
|
139 |
f0 *= pow(2, f0_up_key / 12)
|
|
|
129 |
f0 = f0[0].cpu().numpy()
|
130 |
elif f0_method == "rmvpe":
|
131 |
if hasattr(self, "model_rmvpe") == False:
|
132 |
+
from rmvpe import RMVPE
|
133 |
|
134 |
print("loading rmvpe model")
|
135 |
self.model_rmvpe = RMVPE(
|
136 |
+
os.path.join("assets", "rvmpe", "rvmpe.pt"), is_half=self.is_half, device=self.device
|
137 |
)
|
138 |
f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03)
|
139 |
f0 *= pow(2, f0_up_key / 12)
|