Spaces:
Running
Running
translating app.py to ENGLISH
Browse files
app.py
CHANGED
@@ -1365,9 +1365,9 @@ def download_from_url(url, model):
|
|
1365 |
shutil.rmtree("unzips")
|
1366 |
return "Modelo baixado, você pode voltar para a página de inferência!"
|
1367 |
except:
|
1368 |
-
return "
|
1369 |
def success_message(face):
|
1370 |
-
return f'{face.name}
|
1371 |
def mouth(size, face, voice, faces):
|
1372 |
if size == 'Half':
|
1373 |
size = 2
|
@@ -1512,7 +1512,7 @@ badges = """
|
|
1512 |
"""
|
1513 |
|
1514 |
description = """
|
1515 |
-
|
1516 |
"""
|
1517 |
|
1518 |
with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"), title="RVC - AI HUB BRASIL") as app:
|
@@ -1522,7 +1522,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1522 |
gr.HTML("<h1> Easy GUI | AI HUB BRASIL</h1>")
|
1523 |
with gr.Tabs():
|
1524 |
with gr.TabItem("Inference"):
|
1525 |
-
gr.HTML("<h10>
|
1526 |
|
1527 |
# Inference Preset Row
|
1528 |
# with gr.Row():
|
@@ -1534,11 +1534,11 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1534 |
|
1535 |
# Other RVC stuff
|
1536 |
with gr.Row():
|
1537 |
-
sid0 = gr.Dropdown(label="1.
|
1538 |
-
refresh_button = gr.Button("
|
1539 |
if check_for_name() != '':
|
1540 |
get_vc(sorted(names)[0])
|
1541 |
-
vc_transform0 = gr.Number(label="
|
1542 |
#clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
|
1543 |
spk_item = gr.Slider(
|
1544 |
minimum=0,
|
@@ -1559,29 +1559,29 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1559 |
with gr.Row():
|
1560 |
with gr.Column():
|
1561 |
with gr.Row():
|
1562 |
-
dropbox = gr.File(label="
|
1563 |
with gr.Row():
|
1564 |
-
record_button=gr.Audio(source="microphone", label="
|
1565 |
with gr.Row():
|
1566 |
input_audio0 = gr.Dropdown(
|
1567 |
-
label="2.
|
1568 |
value="./audios/Poema-do-Cume-Arnold",
|
1569 |
choices=audio_files
|
1570 |
)
|
1571 |
dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
|
1572 |
dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1573 |
-
refresh_button2 = gr.Button("
|
1574 |
record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
|
1575 |
record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1576 |
with gr.Row():
|
1577 |
with gr.Accordion('ElevenLabs / Google TTS', open=False):
|
1578 |
with gr.Column():
|
1579 |
-
lang = gr.Radio(label='
|
1580 |
-
api_box = gr.Textbox(label="
|
1581 |
-
elevenid=gr.Dropdown(label="
|
1582 |
with gr.Column():
|
1583 |
-
tfs = gr.Textbox(label="
|
1584 |
-
tts_button = gr.Button(value="
|
1585 |
tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
|
1586 |
with gr.Row():
|
1587 |
with gr.Accordion('Wav2Lip', open=False, visible=False):
|
@@ -1600,24 +1600,24 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1600 |
|
1601 |
with gr.Column():
|
1602 |
vc_output2 = gr.Audio(
|
1603 |
-
label="
|
1604 |
type='filepath',
|
1605 |
interactive=False,
|
1606 |
)
|
1607 |
|
1608 |
with gr.Accordion('Edge-TTS', open=True):
|
1609 |
with gr.Column():
|
1610 |
-
ilariaid=gr.Dropdown(label="
|
1611 |
ilariatext = gr.Textbox(label="Digite o seu Texto", interactive=True, value="Isso é um teste.")
|
1612 |
-
ilariatts_button = gr.Button(value="
|
1613 |
ilariatts_button.click(fn=ilariaTTS, inputs=[ilariatext, ilariaid], outputs=[record_button, input_audio0])
|
1614 |
|
1615 |
#with gr.Column():
|
1616 |
-
with gr.Accordion("
|
1617 |
#with gr.Row():
|
1618 |
|
1619 |
file_index1 = gr.Dropdown(
|
1620 |
-
label="3.
|
1621 |
choices=get_indexes(),
|
1622 |
value=get_index(),
|
1623 |
interactive=True,
|
@@ -1634,16 +1634,16 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1634 |
index_rate1 = gr.Slider(
|
1635 |
minimum=0,
|
1636 |
maximum=1,
|
1637 |
-
label=i18n("
|
1638 |
value=0.66,
|
1639 |
interactive=True,
|
1640 |
)
|
1641 |
|
1642 |
animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
|
1643 |
|
1644 |
-
with gr.Accordion("
|
1645 |
f0method0 = gr.Radio(
|
1646 |
-
label="
|
1647 |
choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
|
1648 |
value="rmvpe",
|
1649 |
interactive=True,
|
@@ -1662,7 +1662,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1662 |
filter_radius0 = gr.Slider(
|
1663 |
minimum=0,
|
1664 |
maximum=7,
|
1665 |
-
label=i18n(">=3, use
|
1666 |
value=3,
|
1667 |
step=1,
|
1668 |
interactive=True,
|
@@ -1679,22 +1679,22 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1679 |
rms_mix_rate0 = gr.Slider(
|
1680 |
minimum=0,
|
1681 |
maximum=1,
|
1682 |
-
label=i18n("
|
1683 |
value=0.21,
|
1684 |
interactive=True,
|
1685 |
)
|
1686 |
protect0 = gr.Slider(
|
1687 |
minimum=0,
|
1688 |
maximum=0.5,
|
1689 |
-
label=i18n("
|
1690 |
value=0.33,
|
1691 |
step=0.01,
|
1692 |
interactive=True,
|
1693 |
)
|
1694 |
formanting = gr.Checkbox(
|
1695 |
value=bool(DoFormant),
|
1696 |
-
label="[EXPERIMENTAL]
|
1697 |
-
info="
|
1698 |
interactive=True,
|
1699 |
visible=True,
|
1700 |
)
|
@@ -1882,7 +1882,7 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
1882 |
[vc_output3],
|
1883 |
)
|
1884 |
but1.click(fn=lambda: easy_uploader.clear())
|
1885 |
-
with gr.TabItem("
|
1886 |
with gr.Row():
|
1887 |
url=gr.Textbox(label="Huggingface Link:")
|
1888 |
with gr.Row():
|
@@ -2138,11 +2138,11 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"
|
|
2138 |
"Quer saber como treinar uma voz? Junte-se ao servidor AI HUB no Discord!\nhttps://discord.gg/aihub ou https://discord.gg/aihubbrasil\n"
|
2139 |
"-------------------------------\n"
|
2140 |
)
|
2141 |
-
gr.Markdown("<h4>
|
2142 |
gr.Markdown(
|
2143 |
"""
|
2144 |
-
|
2145 |
"""
|
2146 |
)
|
2147 |
app.queue(concurrency_count=511, max_size=1022).launch(share=False, quiet=False)
|
2148 |
-
#endregion
|
|
|
1365 |
shutil.rmtree("unzips")
|
1366 |
return "Modelo baixado, você pode voltar para a página de inferência!"
|
1367 |
except:
|
1368 |
+
return "ERROR - download failed. Check if the link is valid."
|
1369 |
def success_message(face):
|
1370 |
+
return f'{face.name} was loaded.', 'None'
|
1371 |
def mouth(size, face, voice, faces):
|
1372 |
if size == 'Half':
|
1373 |
size = 2
|
|
|
1512 |
"""
|
1513 |
|
1514 |
description = """
|
1515 |
+
Placeholder</a>
|
1516 |
"""
|
1517 |
|
1518 |
with gr.Blocks(theme=gr.themes.Default(primary_hue="green", secondary_hue="blue"), title="RVC - AI HUB BRASIL") as app:
|
|
|
1522 |
gr.HTML("<h1> Easy GUI | AI HUB BRASIL</h1>")
|
1523 |
with gr.Tabs():
|
1524 |
with gr.TabItem("Inference"):
|
1525 |
+
gr.HTML("<h10> You can find more models at AI Hub or AI Hub Brasil </h10>")
|
1526 |
|
1527 |
# Inference Preset Row
|
1528 |
# with gr.Row():
|
|
|
1534 |
|
1535 |
# Other RVC stuff
|
1536 |
with gr.Row():
|
1537 |
+
sid0 = gr.Dropdown(label="1. Choose your model", choices=sorted(names), value=check_for_name())
|
1538 |
+
refresh_button = gr.Button("To update", variant="primary")
|
1539 |
if check_for_name() != '':
|
1540 |
get_vc(sorted(names)[0])
|
1541 |
+
vc_transform0 = gr.Number(label="Change the tone here. If the voice is of the same sex, it is not necessary to change (12 if it is Male to Female, -12 if it is the other way around.", value=0)
|
1542 |
#clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
|
1543 |
spk_item = gr.Slider(
|
1544 |
minimum=0,
|
|
|
1559 |
with gr.Row():
|
1560 |
with gr.Column():
|
1561 |
with gr.Row():
|
1562 |
+
dropbox = gr.File(label="Drag your audio file and click update.")
|
1563 |
with gr.Row():
|
1564 |
+
record_button=gr.Audio(source="microphone", label="Or you can use your microphone!", type="filepath")
|
1565 |
with gr.Row():
|
1566 |
input_audio0 = gr.Dropdown(
|
1567 |
+
label="2.Choose the audio file",
|
1568 |
value="./audios/Poema-do-Cume-Arnold",
|
1569 |
choices=audio_files
|
1570 |
)
|
1571 |
dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
|
1572 |
dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1573 |
+
refresh_button2 = gr.Button("To update", variant="primary", size='sm')
|
1574 |
record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
|
1575 |
record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
1576 |
with gr.Row():
|
1577 |
with gr.Accordion('ElevenLabs / Google TTS', open=False):
|
1578 |
with gr.Column():
|
1579 |
+
lang = gr.Radio(label='Chinese and Japanese do not currently work with ElevenLabs.',choices=['en','it','es','fr','pt','zh-CN','de','hi','ja'], value='pt')
|
1580 |
+
api_box = gr.Textbox(label="Enter your API key for ElevenLabs or leave it blank to use GoogleTTS. (It's not mandatory)", value='')
|
1581 |
+
elevenid=gr.Dropdown(label="Voice:", choices=eleven_voices)
|
1582 |
with gr.Column():
|
1583 |
+
tfs = gr.Textbox(label="Enter your Text", interactive=True, value="This is a test.")
|
1584 |
+
tts_button = gr.Button(value="To speak")
|
1585 |
tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
|
1586 |
with gr.Row():
|
1587 |
with gr.Accordion('Wav2Lip', open=False, visible=False):
|
|
|
1600 |
|
1601 |
with gr.Column():
|
1602 |
vc_output2 = gr.Audio(
|
1603 |
+
label="Final result! (Click on the three dots to download the audio)",
|
1604 |
type='filepath',
|
1605 |
interactive=False,
|
1606 |
)
|
1607 |
|
1608 |
with gr.Accordion('Edge-TTS', open=True):
|
1609 |
with gr.Column():
|
1610 |
+
ilariaid=gr.Dropdown(label="Voice:", choices=ilariavoices, value="Brazilian-Antonio- (Male)")
|
1611 |
ilariatext = gr.Textbox(label="Digite o seu Texto", interactive=True, value="Isso é um teste.")
|
1612 |
+
ilariatts_button = gr.Button(value="To speak")
|
1613 |
ilariatts_button.click(fn=ilariaTTS, inputs=[ilariatext, ilariaid], outputs=[record_button, input_audio0])
|
1614 |
|
1615 |
#with gr.Column():
|
1616 |
+
with gr.Accordion("Index Configuration", open=False):
|
1617 |
#with gr.Row():
|
1618 |
|
1619 |
file_index1 = gr.Dropdown(
|
1620 |
+
label="3. Choose the index file (if it was not found automatically).",
|
1621 |
choices=get_indexes(),
|
1622 |
value=get_index(),
|
1623 |
interactive=True,
|
|
|
1634 |
index_rate1 = gr.Slider(
|
1635 |
minimum=0,
|
1636 |
maximum=1,
|
1637 |
+
label=i18n("Search Feature Ratio"),
|
1638 |
value=0.66,
|
1639 |
interactive=True,
|
1640 |
)
|
1641 |
|
1642 |
animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
|
1643 |
|
1644 |
+
with gr.Accordion("advanced options", open=False):
|
1645 |
f0method0 = gr.Radio(
|
1646 |
+
label="Optional: Change the pitch extraction algorithm. Extraction methods are ranked from “worst quality” to “best quality”. If you don't know what you're doing, quit rmvpe.",
|
1647 |
choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
|
1648 |
value="rmvpe",
|
1649 |
interactive=True,
|
|
|
1662 |
filter_radius0 = gr.Slider(
|
1663 |
minimum=0,
|
1664 |
maximum=7,
|
1665 |
+
label=i18n(">=3, use median filtering on the harvest tone recognition result, the value is the filter radius, which may weaken the muted sound."),
|
1666 |
value=3,
|
1667 |
step=1,
|
1668 |
interactive=True,
|
|
|
1679 |
rms_mix_rate0 = gr.Slider(
|
1680 |
minimum=0,
|
1681 |
maximum=1,
|
1682 |
+
label=i18n("The volume envelope of the input source overrides the fusing rate of the output volume envelope. The closer it is to 1, the more output envelope is used."),
|
1683 |
value=0.21,
|
1684 |
interactive=True,
|
1685 |
)
|
1686 |
protect0 = gr.Slider(
|
1687 |
minimum=0,
|
1688 |
maximum=0.5,
|
1689 |
+
label=i18n("Protect voiceless consonants and breath sounds to avoid artifacts such as electronic sound breakdown. Do not activate when it reaches 0.5. Lower it to increase protection, but may reduce the indexing effect."),
|
1690 |
value=0.33,
|
1691 |
step=0.01,
|
1692 |
interactive=True,
|
1693 |
)
|
1694 |
formanting = gr.Checkbox(
|
1695 |
value=bool(DoFormant),
|
1696 |
+
label="[EXPERIMENTAL] Formant shift inference audio",
|
1697 |
+
info="Used for conversions from male to female and vice versa",
|
1698 |
interactive=True,
|
1699 |
visible=True,
|
1700 |
)
|
|
|
1882 |
[vc_output3],
|
1883 |
)
|
1884 |
but1.click(fn=lambda: easy_uploader.clear())
|
1885 |
+
with gr.TabItem("Download new templates"):
|
1886 |
with gr.Row():
|
1887 |
url=gr.Textbox(label="Huggingface Link:")
|
1888 |
with gr.Row():
|
|
|
2138 |
"Quer saber como treinar uma voz? Junte-se ao servidor AI HUB no Discord!\nhttps://discord.gg/aihub ou https://discord.gg/aihubbrasil\n"
|
2139 |
"-------------------------------\n"
|
2140 |
)
|
2141 |
+
gr.Markdown("<h4> Easy GUI (English) </h4>")
|
2142 |
gr.Markdown(
|
2143 |
"""
|
2144 |
+
|
2145 |
"""
|
2146 |
)
|
2147 |
app.queue(concurrency_count=511, max_size=1022).launch(share=False, quiet=False)
|
2148 |
+
#endregion
|