Update app.py
Browse files
app.py
CHANGED
@@ -67,7 +67,7 @@ def create_vc_fn(tgt_sr, net_g, vc, if_f0, file_index):
|
|
67 |
print(
|
68 |
f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s"
|
69 |
)
|
70 |
-
return "
|
71 |
except:
|
72 |
info = traceback.format_exc()
|
73 |
print(info)
|
@@ -129,7 +129,7 @@ if __name__ == '__main__':
|
|
129 |
else:
|
130 |
folder_path = "weights"
|
131 |
for name in os.listdir(folder_path):
|
132 |
-
print("
|
133 |
if name.startswith("."): break
|
134 |
if name.endswith(".json"):
|
135 |
continue
|
@@ -164,10 +164,10 @@ if __name__ == '__main__':
|
|
164 |
models.append((name, title, author, cover, create_vc_fn(tgt_sr, net_g, vc, if_f0, index)))
|
165 |
with gr.Blocks() as app:
|
166 |
gr.Markdown(
|
167 |
-
"# <center> RVC
|
168 |
-
"## <center>
|
169 |
-
"### <center> [
|
170 |
-
"#### <center> Please regenerate your model to latest RVC to fully applied this new rvc.\n"
|
171 |
"[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/110kiMZTdP6Ri1lY9-NbQf17GVPPhHyeT?usp=sharing)\n\n"
|
172 |
"[![Original Repo](https://badgen.net/badge/icon/github?icon=github&label=Original%20Repo)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)"
|
173 |
)
|
@@ -184,10 +184,10 @@ if __name__ == '__main__':
|
|
184 |
)
|
185 |
with gr.Row():
|
186 |
with gr.Column():
|
187 |
-
vc_input = gr.Audio(label="
|
188 |
vc_transpose = gr.Number(label="Transpose", value=0)
|
189 |
vc_f0method = gr.Radio(
|
190 |
-
label="Pitch extraction algorithm, PM is fast but Harvest is better for low frequencies",
|
191 |
choices=["pm", "harvest"],
|
192 |
value="pm",
|
193 |
interactive=True,
|
@@ -195,17 +195,17 @@ if __name__ == '__main__':
|
|
195 |
vc_index_ratio = gr.Slider(
|
196 |
minimum=0,
|
197 |
maximum=1,
|
198 |
-
label="
|
199 |
value=0.6,
|
200 |
interactive=True,
|
201 |
)
|
202 |
-
tts_mode = gr.Checkbox(label="
|
203 |
-
tts_text = gr.Textbox(visible=False,label="
|
204 |
-
tts_voice = gr.Dropdown(label="Edge-tts
|
205 |
-
vc_submit = gr.Button("
|
206 |
with gr.Column():
|
207 |
-
vc_output1 = gr.Textbox(label="
|
208 |
-
vc_output2 = gr.Audio(label="
|
209 |
vc_submit.click(vc_fn, [vc_input, vc_transpose, vc_f0method, vc_index_ratio, tts_mode, tts_text, tts_voice], [vc_output1, vc_output2])
|
210 |
tts_mode.change(change_to_tts_mode, [tts_mode], [vc_input, tts_text, tts_voice])
|
211 |
gr.Markdown('# <center>Changelog 2023.05.15')
|
|
|
67 |
print(
|
68 |
f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s"
|
69 |
)
|
70 |
+
return "Perfecto", (tgt_sr, audio_opt)
|
71 |
except:
|
72 |
info = traceback.format_exc()
|
73 |
print(info)
|
|
|
129 |
else:
|
130 |
folder_path = "weights"
|
131 |
for name in os.listdir(folder_path):
|
132 |
+
print("Comprobando carpeta: " + name)
|
133 |
if name.startswith("."): break
|
134 |
if name.endswith(".json"):
|
135 |
continue
|
|
|
164 |
models.append((name, title, author, cover, create_vc_fn(tgt_sr, net_g, vc, if_f0, index)))
|
165 |
with gr.Blocks() as app:
|
166 |
gr.Markdown(
|
167 |
+
"# <center> RVC GURA Model (Ultima Actualización)\n"
|
168 |
+
"## <center> El audio introducido debe estar limpio,que no contenga musica de fondo, mala calidad, ruidos, estatica\n"
|
169 |
+
"### <center> [Recomiendo utilizar google colab para mejores funcionalidades, pero no habra gura ahi](https://colab.research.google.com/drive/110kiMZTdP6Ri1lY9-NbQf17GVPPhHyeT?usp=sharing) \n"
|
170 |
+
#"#### <center> Please regenerate your model to latest RVC to fully applied this new rvc.\n"
|
171 |
"[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/110kiMZTdP6Ri1lY9-NbQf17GVPPhHyeT?usp=sharing)\n\n"
|
172 |
"[![Original Repo](https://badgen.net/badge/icon/github?icon=github&label=Original%20Repo)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)"
|
173 |
)
|
|
|
184 |
)
|
185 |
with gr.Row():
|
186 |
with gr.Column():
|
187 |
+
vc_input = gr.Audio(label="Audio de entrada"+' (menos de 20 segundos)' if limitation else '')
|
188 |
vc_transpose = gr.Number(label="Transpose", value=0)
|
189 |
vc_f0method = gr.Radio(
|
190 |
+
label="Pitch extraction algorithm, PM is fast but Harvest is better for low frequencies /Algoritmo de extracción de tono, PM es rápido pero Harvest es mejor para frecuencias bajas",
|
191 |
choices=["pm", "harvest"],
|
192 |
value="pm",
|
193 |
interactive=True,
|
|
|
195 |
vc_index_ratio = gr.Slider(
|
196 |
minimum=0,
|
197 |
maximum=1,
|
198 |
+
label="Relacion respecto al audio",
|
199 |
value=0.6,
|
200 |
interactive=True,
|
201 |
)
|
202 |
+
tts_mode = gr.Checkbox(label="Texto a Voz (usa edge-tts como entrada)", value=False)
|
203 |
+
tts_text = gr.Textbox(visible=False,label="Texto (100 palabras limite)" if limitation else "Texto TTS")
|
204 |
+
tts_voice = gr.Dropdown(label="Hablante Edge-tts", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female")
|
205 |
+
vc_submit = gr.Button("Generar", variant="primary")
|
206 |
with gr.Column():
|
207 |
+
vc_output1 = gr.Textbox(label="Mensaje de salida")
|
208 |
+
vc_output2 = gr.Audio(label="Audio de salida")
|
209 |
vc_submit.click(vc_fn, [vc_input, vc_transpose, vc_f0method, vc_index_ratio, tts_mode, tts_text, tts_voice], [vc_output1, vc_output2])
|
210 |
tts_mode.change(change_to_tts_mode, [tts_mode], [vc_input, tts_text, tts_voice])
|
211 |
gr.Markdown('# <center>Changelog 2023.05.15')
|