Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1473,10 +1473,10 @@ def zip_downloader(model):
|
|
| 1473 |
|
| 1474 |
with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
| 1475 |
with gr.Tabs():
|
| 1476 |
-
with gr.TabItem("
|
| 1477 |
gr.HTML("<h1> RVC V2 Huggingface Version </h1>")
|
| 1478 |
-
gr.HTML("<h10> Huggingface
|
| 1479 |
-
gr.HTML("<h4>
|
| 1480 |
|
| 1481 |
# Inference Preset Row
|
| 1482 |
# with gr.Row():
|
|
@@ -1488,11 +1488,11 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1488 |
|
| 1489 |
# Other RVC stuff
|
| 1490 |
with gr.Row():
|
| 1491 |
-
sid0 = gr.Dropdown(label="1.
|
| 1492 |
-
refresh_button = gr.Button("
|
| 1493 |
if check_for_name() != '':
|
| 1494 |
get_vc(sorted(names)[0])
|
| 1495 |
-
vc_transform0 = gr.Number(label="
|
| 1496 |
#clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
|
| 1497 |
spk_item = gr.Slider(
|
| 1498 |
minimum=0,
|
|
@@ -1509,36 +1509,36 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1509 |
inputs=[sid0],
|
| 1510 |
outputs=[spk_item],
|
| 1511 |
)
|
| 1512 |
-
but0 = gr.Button("
|
| 1513 |
with gr.Row():
|
| 1514 |
with gr.Column():
|
| 1515 |
with gr.Row():
|
| 1516 |
-
dropbox = gr.File(label="
|
| 1517 |
with gr.Row():
|
| 1518 |
-
record_button=gr.Audio(source="microphone", label="
|
| 1519 |
with gr.Row():
|
| 1520 |
input_audio0 = gr.Dropdown(
|
| 1521 |
-
label="2.
|
| 1522 |
value="./audios/someguy.mp3",
|
| 1523 |
choices=audio_files
|
| 1524 |
)
|
| 1525 |
dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
|
| 1526 |
dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
| 1527 |
-
refresh_button2 = gr.Button("
|
| 1528 |
record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
|
| 1529 |
record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
| 1530 |
with gr.Row():
|
| 1531 |
-
with gr.Accordion('
|
| 1532 |
with gr.Column():
|
| 1533 |
-
lang = gr.Radio(label='
|
| 1534 |
-
api_box = gr.Textbox(label="
|
| 1535 |
-
elevenid=gr.Dropdown(label="
|
| 1536 |
with gr.Column():
|
| 1537 |
-
tfs = gr.Textbox(label="
|
| 1538 |
-
tts_button = gr.Button(value="
|
| 1539 |
tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
|
| 1540 |
with gr.Row():
|
| 1541 |
-
with gr.Accordion('Wav2Lip', open=False):
|
| 1542 |
with gr.Row():
|
| 1543 |
size = gr.Radio(label='Resolution:',choices=['Half','Full'])
|
| 1544 |
face = gr.UploadButton("Upload A Character",type='file')
|
|
@@ -1553,9 +1553,9 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1553 |
animate_button = gr.Button('Animate')
|
| 1554 |
|
| 1555 |
with gr.Column():
|
| 1556 |
-
with gr.Accordion("
|
| 1557 |
file_index1 = gr.Dropdown(
|
| 1558 |
-
label="3.
|
| 1559 |
choices=get_indexes(),
|
| 1560 |
value=get_index(),
|
| 1561 |
interactive=True,
|
|
@@ -1572,19 +1572,19 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1572 |
index_rate1 = gr.Slider(
|
| 1573 |
minimum=0,
|
| 1574 |
maximum=1,
|
| 1575 |
-
label=i18n("
|
| 1576 |
value=0.66,
|
| 1577 |
interactive=True,
|
| 1578 |
)
|
| 1579 |
vc_output2 = gr.Audio(
|
| 1580 |
-
label="
|
| 1581 |
type='filepath',
|
| 1582 |
interactive=False,
|
| 1583 |
)
|
| 1584 |
animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
|
| 1585 |
-
with gr.Accordion("
|
| 1586 |
f0method0 = gr.Radio(
|
| 1587 |
-
label="
|
| 1588 |
choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
|
| 1589 |
value="rmvpe",
|
| 1590 |
interactive=True,
|
|
@@ -1594,7 +1594,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1594 |
minimum=1,
|
| 1595 |
maximum=512,
|
| 1596 |
step=1,
|
| 1597 |
-
label="Mangio-Crepe Hop Length.
|
| 1598 |
value=120,
|
| 1599 |
interactive=True,
|
| 1600 |
visible=False,
|
|
@@ -1603,7 +1603,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1603 |
filter_radius0 = gr.Slider(
|
| 1604 |
minimum=0,
|
| 1605 |
maximum=7,
|
| 1606 |
-
label=i18n(">=3
|
| 1607 |
value=3,
|
| 1608 |
step=1,
|
| 1609 |
interactive=True,
|
|
@@ -1620,14 +1620,14 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1620 |
rms_mix_rate0 = gr.Slider(
|
| 1621 |
minimum=0,
|
| 1622 |
maximum=1,
|
| 1623 |
-
label=i18n("
|
| 1624 |
value=0.21,
|
| 1625 |
interactive=True,
|
| 1626 |
)
|
| 1627 |
protect0 = gr.Slider(
|
| 1628 |
minimum=0,
|
| 1629 |
maximum=0.5,
|
| 1630 |
-
label=i18n("
|
| 1631 |
value=0.33,
|
| 1632 |
step=0.01,
|
| 1633 |
interactive=True,
|
|
@@ -1637,7 +1637,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1637 |
label="[EXPERIMENTAL] Formant shift inference audio",
|
| 1638 |
info="Used for male to female and vice-versa conversions",
|
| 1639 |
interactive=True,
|
| 1640 |
-
visible=
|
| 1641 |
)
|
| 1642 |
|
| 1643 |
formant_preset = gr.Dropdown(
|
|
@@ -1705,7 +1705,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1705 |
[vc_output1, vc_output2],
|
| 1706 |
)
|
| 1707 |
|
| 1708 |
-
with gr.Accordion("Batch Conversion",open=False):
|
| 1709 |
with gr.Row():
|
| 1710 |
with gr.Column():
|
| 1711 |
vc_transform1 = gr.Number(
|
|
@@ -1822,12 +1822,12 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
|
| 1822 |
[vc_output3],
|
| 1823 |
)
|
| 1824 |
but1.click(fn=lambda: easy_uploader.clear())
|
| 1825 |
-
with gr.TabItem("
|
| 1826 |
with gr.Row():
|
| 1827 |
-
url=gr.Textbox(label="
|
| 1828 |
with gr.Row():
|
| 1829 |
-
model = gr.Textbox(label="
|
| 1830 |
-
download_button=gr.Button("
|
| 1831 |
with gr.Row():
|
| 1832 |
status_bar=gr.Textbox(label="")
|
| 1833 |
download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
|
|
|
|
| 1473 |
|
| 1474 |
with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
|
| 1475 |
with gr.Tabs():
|
| 1476 |
+
with gr.TabItem("Интерфейс"):
|
| 1477 |
gr.HTML("<h1> RVC V2 Huggingface Version </h1>")
|
| 1478 |
+
gr.HTML("<h10> Huggingface версия созданная Clebersla </h10>")
|
| 1479 |
+
gr.HTML("<h4> Если вы хотите использовать это помещение в частном порядке, я рекомендую продублировать его. </h4>")
|
| 1480 |
|
| 1481 |
# Inference Preset Row
|
| 1482 |
# with gr.Row():
|
|
|
|
| 1488 |
|
| 1489 |
# Other RVC stuff
|
| 1490 |
with gr.Row():
|
| 1491 |
+
sid0 = gr.Dropdown(label="1.Выберите свою модель.", choices=sorted(names), value=check_for_name())
|
| 1492 |
+
refresh_button = gr.Button("Обновить", variant="primary")
|
| 1493 |
if check_for_name() != '':
|
| 1494 |
get_vc(sorted(names)[0])
|
| 1495 |
+
vc_transform0 = gr.Number(label="Дополнительно: Здесь можно изменить высоту тона или оставить ее равной 0.", value=0)
|
| 1496 |
#clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
|
| 1497 |
spk_item = gr.Slider(
|
| 1498 |
minimum=0,
|
|
|
|
| 1509 |
inputs=[sid0],
|
| 1510 |
outputs=[spk_item],
|
| 1511 |
)
|
| 1512 |
+
but0 = gr.Button("Конвертировать", variant="primary")
|
| 1513 |
with gr.Row():
|
| 1514 |
with gr.Column():
|
| 1515 |
with gr.Row():
|
| 1516 |
+
dropbox = gr.File(label="Отправьте аудиозапись сюда и нажмите кнопку "Перезагрузка".")
|
| 1517 |
with gr.Row():
|
| 1518 |
+
record_button=gr.Audio(source="microphone", label="Запись звука с микрофона", type="filepath")
|
| 1519 |
with gr.Row():
|
| 1520 |
input_audio0 = gr.Dropdown(
|
| 1521 |
+
label="2.Выберите аудиозапись.",
|
| 1522 |
value="./audios/someguy.mp3",
|
| 1523 |
choices=audio_files
|
| 1524 |
)
|
| 1525 |
dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
|
| 1526 |
dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
| 1527 |
+
refresh_button2 = gr.Button("Обновить", variant="primary", size='sm')
|
| 1528 |
record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
|
| 1529 |
record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
|
| 1530 |
with gr.Row():
|
| 1531 |
+
with gr.Accordion('Текст в речь', open=False):
|
| 1532 |
with gr.Column():
|
| 1533 |
+
lang = gr.Radio(label='Китайский и японский языки в настоящее время не работают с ElevenLabs.',choices=['en','es','ru','uk','pl','fr','de','tr'], value='en')
|
| 1534 |
+
api_box = gr.Textbox(label="Введите свой API-ключ для ElevenLabs или оставьте пустым, чтобы использовать GoogleTTS", value='')
|
| 1535 |
+
elevenid=gr.Dropdown(label="Голос:", choices=eleven_voices)
|
| 1536 |
with gr.Column():
|
| 1537 |
+
tfs = gr.Textbox(label="Введите свой текст", interactive=True, value="This is a test.")
|
| 1538 |
+
tts_button = gr.Button(value="Генерировать")
|
| 1539 |
tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
|
| 1540 |
with gr.Row():
|
| 1541 |
+
with gr.Accordion('Wav2Lip', open=False, visible=False):
|
| 1542 |
with gr.Row():
|
| 1543 |
size = gr.Radio(label='Resolution:',choices=['Half','Full'])
|
| 1544 |
face = gr.UploadButton("Upload A Character",type='file')
|
|
|
|
| 1553 |
animate_button = gr.Button('Animate')
|
| 1554 |
|
| 1555 |
with gr.Column():
|
| 1556 |
+
with gr.Accordion("Настройка индекса", open=False):
|
| 1557 |
file_index1 = gr.Dropdown(
|
| 1558 |
+
label="3. Путь к файлу added.index (если он не был найден автоматически).",
|
| 1559 |
choices=get_indexes(),
|
| 1560 |
value=get_index(),
|
| 1561 |
interactive=True,
|
|
|
|
| 1572 |
index_rate1 = gr.Slider(
|
| 1573 |
minimum=0,
|
| 1574 |
maximum=1,
|
| 1575 |
+
label=i18n("Соотношение поисковых функций (советую ставить на 0):"),
|
| 1576 |
value=0.66,
|
| 1577 |
interactive=True,
|
| 1578 |
)
|
| 1579 |
vc_output2 = gr.Audio(
|
| 1580 |
+
label="Выходные аудиоданные (нажмите на три точки в правом углу, чтобы загрузить)",
|
| 1581 |
type='filepath',
|
| 1582 |
interactive=False,
|
| 1583 |
)
|
| 1584 |
animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
|
| 1585 |
+
with gr.Accordion("Дополнительные настройки", open=False):
|
| 1586 |
f0method0 = gr.Radio(
|
| 1587 |
+
label="Необязательно: Изменить алгоритм извлечения высоты тона.\Методы извлечения отсортированы от "худшего качества" к "лучшему качеству".\mangio-crepe может быть лучше rmvpe или нет в случаях, когда "гладкость" более важна, но в целом rmvpe является лучшим.",
|
| 1588 |
choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
|
| 1589 |
value="rmvpe",
|
| 1590 |
interactive=True,
|
|
|
|
| 1594 |
minimum=1,
|
| 1595 |
maximum=512,
|
| 1596 |
step=1,
|
| 1597 |
+
label="Mangio-Crepe Hop Length. Более высокие числа уменьшат вероятность экстремального изменения высоты тона, но более низкие числа увеличат точность. 64-192 - хороший диапазон для экспериментов.",
|
| 1598 |
value=120,
|
| 1599 |
interactive=True,
|
| 1600 |
visible=False,
|
|
|
|
| 1603 |
filter_radius0 = gr.Slider(
|
| 1604 |
minimum=0,
|
| 1605 |
maximum=7,
|
| 1606 |
+
label=i18n("Если >=3: применить медианную фильтрацию к собранным результатам питча. Значение представляет собой радиус фильтрации и может уменьшить дыхание."),
|
| 1607 |
value=3,
|
| 1608 |
step=1,
|
| 1609 |
interactive=True,
|
|
|
|
| 1620 |
rms_mix_rate0 = gr.Slider(
|
| 1621 |
minimum=0,
|
| 1622 |
maximum=1,
|
| 1623 |
+
label=i18n("Используйте огибающую громкости входа для замены или смешивания с огибающей громкости выхода. Чем ближе это соотношение к 1, тем больше используется огибающая выходного сигнала:"),
|
| 1624 |
value=0.21,
|
| 1625 |
interactive=True,
|
| 1626 |
)
|
| 1627 |
protect0 = gr.Slider(
|
| 1628 |
minimum=0,
|
| 1629 |
maximum=0.5,
|
| 1630 |
+
label=i18n("Защита безголосых согласных и звуков дыхания для предотвращения артефактов, таких как разрывы в электронной музыке. Для отключения установите значение 0,5. Уменьшите значение для усиления защиты, но это может снизить точность индексирования:"),
|
| 1631 |
value=0.33,
|
| 1632 |
step=0.01,
|
| 1633 |
interactive=True,
|
|
|
|
| 1637 |
label="[EXPERIMENTAL] Formant shift inference audio",
|
| 1638 |
info="Used for male to female and vice-versa conversions",
|
| 1639 |
interactive=True,
|
| 1640 |
+
visible=False,
|
| 1641 |
)
|
| 1642 |
|
| 1643 |
formant_preset = gr.Dropdown(
|
|
|
|
| 1705 |
[vc_output1, vc_output2],
|
| 1706 |
)
|
| 1707 |
|
| 1708 |
+
with gr.Accordion("Batch Conversion",open=False, visible=False):
|
| 1709 |
with gr.Row():
|
| 1710 |
with gr.Column():
|
| 1711 |
vc_transform1 = gr.Number(
|
|
|
|
| 1822 |
[vc_output3],
|
| 1823 |
)
|
| 1824 |
but1.click(fn=lambda: easy_uploader.clear())
|
| 1825 |
+
with gr.TabItem("Загрузка моделей"):
|
| 1826 |
with gr.Row():
|
| 1827 |
+
url=gr.Textbox(label="Введите URL-адрес модели:")
|
| 1828 |
with gr.Row():
|
| 1829 |
+
model = gr.Textbox(label="Название модели:")
|
| 1830 |
+
download_button=gr.Button("Загрузить")
|
| 1831 |
with gr.Row():
|
| 1832 |
status_bar=gr.Textbox(label="")
|
| 1833 |
download_button.click(fn=download_from_url, inputs=[url, model], outputs=[status_bar])
|