Luzixus commited on
Commit
1fa9cbd
·
1 Parent(s): ecd13a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +54 -55
app.py CHANGED
@@ -1472,12 +1472,13 @@ def zip_downloader(model):
1472
 
1473
  with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1474
  with gr.Tabs():
1475
- with gr.TabItem("Inference"):
1476
- gr.HTML("<h1> RVC V2 Huggingface Version </h1>")
1477
- gr.HTML("<h4> Inference may take time because this space does not use GPU :( </h4>")
1478
- gr.HTML("<h10> Huggingface version made by Clebersla </h10>")
1479
- gr.HTML("<h10> Easy GUI coded by Rejekt's </h10>")
1480
- gr.HTML("<h4> If you want to use this space privately, I recommend you duplicate the space. </h4>")
 
1481
 
1482
  # Inference Preset Row
1483
  # with gr.Row():
@@ -1489,11 +1490,11 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1489
 
1490
  # Other RVC stuff
1491
  with gr.Row():
1492
- sid0 = gr.Dropdown(label="1.Choose your Model.", choices=sorted(names), value=check_for_name())
1493
- refresh_button = gr.Button("Refresh", variant="primary")
1494
  if check_for_name() != '':
1495
  get_vc(sorted(names)[0])
1496
- vc_transform0 = gr.Number(label="Optional: You can change the pitch here or leave it at 0.", value=0)
1497
  #clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
1498
  spk_item = gr.Slider(
1499
  minimum=0,
@@ -1510,53 +1511,53 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1510
  inputs=[sid0],
1511
  outputs=[spk_item],
1512
  )
1513
- but0 = gr.Button("Convert", variant="primary")
1514
  with gr.Row():
1515
  with gr.Column():
1516
  with gr.Row():
1517
- dropbox = gr.File(label="Drop your audio here & hit the Reload button.")
1518
  with gr.Row():
1519
- record_button=gr.Audio(source="microphone", label="OR Record audio.", type="filepath")
1520
  with gr.Row():
1521
  input_audio0 = gr.Dropdown(
1522
- label="2.Choose your audio.",
1523
- value="./audios/someguy.mp3",
1524
  choices=audio_files
1525
  )
1526
  dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
1527
  dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
1528
- refresh_button2 = gr.Button("Refresh", variant="primary", size='sm')
1529
  record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
1530
  record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
1531
  with gr.Row():
1532
- with gr.Accordion('Text To Speech', open=False):
1533
  with gr.Column():
1534
- lang = gr.Radio(label='Chinese & Japanese do not work with ElevenLabs currently.',choices=['en','es','fr','pt','zh-CN','de','hi','ja'], value='en')
1535
- api_box = gr.Textbox(label="Enter your API Key for ElevenLabs, or leave empty to use GoogleTTS", value='')
1536
- elevenid=gr.Dropdown(label="Voice:", choices=eleven_voices)
1537
  with gr.Column():
1538
- tfs = gr.Textbox(label="Input your Text", interactive=True, value="This is a test.")
1539
- tts_button = gr.Button(value="Speak")
1540
  tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
1541
  with gr.Row():
1542
  with gr.Accordion('Wav2Lip', open=False):
1543
  with gr.Row():
1544
- size = gr.Radio(label='Resolution:',choices=['Half','Full'])
1545
- face = gr.UploadButton("Upload A Character",type='file')
1546
- faces = gr.Dropdown(label="OR Choose one:", choices=['None','Ben Shapiro','Andrew Tate'])
1547
  with gr.Row():
1548
- preview = gr.Textbox(label="Status:",interactive=False)
1549
  face.upload(fn=success_message,inputs=[face], outputs=[preview, faces])
1550
  with gr.Row():
1551
  animation = gr.Video(type='filepath')
1552
  refresh_button2.click(fn=change_choices2, inputs=[], outputs=[input_audio0, animation])
1553
  with gr.Row():
1554
- animate_button = gr.Button('Animate')
1555
 
1556
  with gr.Column():
1557
- with gr.Accordion("Index Settings", open=False):
1558
  file_index1 = gr.Dropdown(
1559
- label="3. Path to your added.index file (if it didn't automatically find it.)",
1560
  choices=get_indexes(),
1561
  value=get_index(),
1562
  interactive=True,
@@ -1573,19 +1574,19 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1573
  index_rate1 = gr.Slider(
1574
  minimum=0,
1575
  maximum=1,
1576
- label=i18n("检索特征占比"),
1577
  value=0.66,
1578
  interactive=True,
1579
  )
1580
  vc_output2 = gr.Audio(
1581
- label="Output Audio (Click on the Three Dots in the Right Corner to Download)",
1582
  type='filepath',
1583
  interactive=False,
1584
  )
1585
  animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
1586
- with gr.Accordion("Advanced Settings", open=False):
1587
  f0method0 = gr.Radio(
1588
- label="Optional: Change the Pitch Extraction Algorithm.\nExtraction methods are sorted from 'worst quality' to 'best quality'.\nmangio-crepe may or may not be better than rmvpe in cases where 'smoothness' is more important, but rmvpe is the best overall.",
1589
  choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
1590
  value="rmvpe",
1591
  interactive=True,
@@ -1595,7 +1596,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1595
  minimum=1,
1596
  maximum=512,
1597
  step=1,
1598
- label="Mangio-Crepe Hop Length. Higher numbers will reduce the chance of extreme pitch changes but lower numbers will increase accuracy. 64-192 is a good range to experiment with.",
1599
  value=120,
1600
  interactive=True,
1601
  visible=False,
@@ -1635,8 +1636,8 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1635
  )
1636
  formanting = gr.Checkbox(
1637
  value=bool(DoFormant),
1638
- label="[EXPERIMENTAL] Formant shift inference audio",
1639
- info="Used for male to female and vice-versa conversions",
1640
  interactive=True,
1641
  visible=True,
1642
  )
@@ -1677,7 +1678,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1677
  )
1678
 
1679
  formant_preset.change(fn=preset_apply, inputs=[formant_preset, qfrency, tmbre], outputs=[qfrency, tmbre])
1680
- frmntbut = gr.Button("Apply", variant="primary", visible=bool(DoFormant))
1681
  formanting.change(fn=formant_enabled,inputs=[formanting,qfrency,tmbre,frmntbut,formant_preset,formant_refresh_button],outputs=[formanting,qfrency,tmbre,frmntbut,formant_preset,formant_refresh_button])
1682
  frmntbut.click(fn=formant_apply,inputs=[qfrency, tmbre], outputs=[qfrency, tmbre])
1683
  formant_refresh_button.click(fn=update_fshift_presets,inputs=[formant_preset, qfrency, tmbre],outputs=[formant_preset, qfrency, tmbre])
@@ -1706,17 +1707,17 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1706
  [vc_output1, vc_output2],
1707
  )
1708
 
1709
- with gr.Accordion("Batch Conversion",open=False):
1710
  with gr.Row():
1711
  with gr.Column():
1712
  vc_transform1 = gr.Number(
1713
- label=i18n("变调(整数, 半音数量, 升八度12降八度-12)"), value=0
1714
  )
1715
- opt_input = gr.Textbox(label=i18n("指定输出文件夹"), value="opt")
1716
  f0method1 = gr.Radio(
1717
- label=i18n(
1718
- "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU"
1719
- ),
1720
  choices=["pm", "harvest", "crepe", "rmvpe"],
1721
  value="rmvpe",
1722
  interactive=True,
@@ -1731,12 +1732,12 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1731
  )
1732
  with gr.Column():
1733
  file_index3 = gr.Textbox(
1734
- label=i18n("特征检索库文件路径,为空则使用下拉的选择结果"),
1735
  value="",
1736
  interactive=True,
1737
  )
1738
  file_index4 = gr.Dropdown(
1739
- label=i18n("自动检测index路径,下拉式选择(dropdown)"),
1740
  choices=sorted(index_paths),
1741
  interactive=True,
1742
  )
@@ -1753,7 +1754,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1753
  index_rate2 = gr.Slider(
1754
  minimum=0,
1755
  maximum=1,
1756
- label=i18n("检索特征占比"),
1757
  value=1,
1758
  interactive=True,
1759
  )
@@ -1761,7 +1762,7 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1761
  resample_sr1 = gr.Slider(
1762
  minimum=0,
1763
  maximum=48000,
1764
- label=i18n("后处理重采样至最终采样率,0为不进行重采样"),
1765
  value=0,
1766
  step=1,
1767
  interactive=True,
@@ -1769,37 +1770,35 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1769
  rms_mix_rate1 = gr.Slider(
1770
  minimum=0,
1771
  maximum=1,
1772
- label=i18n("输入源音量包络替换输出音量包络融合比例,越靠近1越使用输出包络"),
1773
  value=1,
1774
  interactive=True,
1775
  )
1776
  protect1 = gr.Slider(
1777
  minimum=0,
1778
  maximum=0.5,
1779
- label=i18n(
1780
- "保护清辅音和呼吸声,防止电音撕裂等artifact,拉满0.5不开启,调低加大保护力度但可能降低索引效果"
1781
- ),
1782
  value=0.33,
1783
  step=0.01,
1784
  interactive=True,
1785
  )
1786
  with gr.Column():
1787
  dir_input = gr.Textbox(
1788
- label=i18n("输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)"),
1789
  value="E:\codes\py39\\test-20230416b\\todo-songs",
1790
  )
1791
  inputs = gr.File(
1792
- file_count="multiple", label=i18n("也可批量输入音频文件, 二选一, 优先读文件夹")
1793
  )
1794
  with gr.Row():
1795
  format1 = gr.Radio(
1796
- label=i18n("导出文件格式"),
1797
  choices=["wav", "flac", "mp3", "m4a"],
1798
  value="flac",
1799
  interactive=True,
1800
  )
1801
- but1 = gr.Button(i18n("转换"), variant="primary")
1802
- vc_output3 = gr.Textbox(label=i18n("输出信息"))
1803
  but1.click(
1804
  vc_multi,
1805
  [
 
1472
 
1473
  with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
1474
  with gr.Tabs():
1475
+ with gr.TabItem("RVC GUI V2"):
1476
+ gr.HTML("<h1> RVC V2 - HuggingFace Versiyon (Türkçe) </h1>")
1477
+ gr.HTML("<h4> Kendi GPU'nuzu veya Google Colab kullanmadan AI Cover yapın! </h4>")
1478
+ gr.HTML("<h10> Huggingface versiyon Clebersla'ya aittir. </h10>")
1479
+ gr.HTML("<h10> Çeviren: Luzixus </h10>")
1480
+ gr.HTML("<h10> Easy GUI, Rejekt's tarafından kodlandı. </h10>")
1481
+ gr.HTML("<h4> Bu alanı özel olarak kullanmak istiyorsanız, alanı çoğaltmanız tavsiye edilir. </h4>")
1482
 
1483
  # Inference Preset Row
1484
  # with gr.Row():
 
1490
 
1491
  # Other RVC stuff
1492
  with gr.Row():
1493
+ sid0 = gr.Dropdown(label="1.Ses Modelini Seç.", choices=sorted(names), value=check_for_name())
1494
+ refresh_button = gr.Button("Modelleri Yenile", variant="primary")
1495
  if check_for_name() != '':
1496
  get_vc(sorted(names)[0])
1497
+ vc_transform0 = gr.Number(label="isteğe bağlı: Ses perdesini buradan değiştirebilir veya 0 olarak bırakabilirsin.", value=0)
1498
  #clean_button = gr.Button(i18n("卸载音色省显存"), variant="primary")
1499
  spk_item = gr.Slider(
1500
  minimum=0,
 
1511
  inputs=[sid0],
1512
  outputs=[spk_item],
1513
  )
1514
+ but0 = gr.Button("Dönüştür", variant="primary")
1515
  with gr.Row():
1516
  with gr.Column():
1517
  with gr.Row():
1518
+ dropbox = gr.File(label="Müzikten ayırdığınız vokal ses dosyasını buraya yükleyin ve Yenile'ye tıklayın.")
1519
  with gr.Row():
1520
+ record_button=gr.Audio(source="microphone", label="ya da Sesini kaydederek yükle.", type="filepath")
1521
  with gr.Row():
1522
  input_audio0 = gr.Dropdown(
1523
+ label="2.Ses Dosyasını Seç.",
1524
+ value="./audios/vocalsound.mp3",
1525
  choices=audio_files
1526
  )
1527
  dropbox.upload(fn=save_to_wav2, inputs=[dropbox], outputs=[input_audio0])
1528
  dropbox.upload(fn=change_choices2, inputs=[], outputs=[input_audio0])
1529
+ refresh_button2 = gr.Button("Yenile", variant="primary", size='sm')
1530
  record_button.change(fn=save_to_wav, inputs=[record_button], outputs=[input_audio0])
1531
  record_button.change(fn=change_choices2, inputs=[], outputs=[input_audio0])
1532
  with gr.Row():
1533
+ with gr.Accordion('Metinden Sese (TTS)', open=False):
1534
  with gr.Column():
1535
+ lang = gr.Radio(label='Çince ve Japonca şu anda ElevenLabs ile çalışmamaktadır.',choices=['en','es','fr','pt','zh-CN','de','hi','ja', 'tr'], value='en')
1536
+ api_box = gr.Textbox(label="ElevenLabs için API Anahtarı girin, ya da boş bırakarak Google Metinden Sese(TTS) kullanabilirsiniz.", value='')
1537
+ elevenid=gr.Dropdown(label="Ses:", choices=eleven_voices)
1538
  with gr.Column():
1539
+ tfs = gr.Textbox(label="Metnini Gir", interactive=True, value="Bu bir test konuşmasıdır.")
1540
+ tts_button = gr.Button(value="Konuştur")
1541
  tts_button.click(fn=elevenTTS, inputs=[api_box,tfs, elevenid, lang], outputs=[record_button, input_audio0])
1542
  with gr.Row():
1543
  with gr.Accordion('Wav2Lip', open=False):
1544
  with gr.Row():
1545
+ size = gr.Radio(label='Çözünürlük:',choices=['Yarım','Tam'])
1546
+ face = gr.UploadButton("Karakteri Yükle",type='file')
1547
+ faces = gr.Dropdown(label="ya da Birini Seç:", choices=['(hiçbiri)','Ben Shapiro','Andrew Tate'])
1548
  with gr.Row():
1549
+ preview = gr.Textbox(label="Durum:",interactive=False)
1550
  face.upload(fn=success_message,inputs=[face], outputs=[preview, faces])
1551
  with gr.Row():
1552
  animation = gr.Video(type='filepath')
1553
  refresh_button2.click(fn=change_choices2, inputs=[], outputs=[input_audio0, animation])
1554
  with gr.Row():
1555
+ animate_button = gr.Button('Canlandır')
1556
 
1557
  with gr.Column():
1558
+ with gr.Accordion("Index Ayarları", open=False):
1559
  file_index1 = gr.Dropdown(
1560
+ label="3. added.index dosyanızın yolu (otomatik olarak bulamadıysa ekleyin).",
1561
  choices=get_indexes(),
1562
  value=get_index(),
1563
  interactive=True,
 
1574
  index_rate1 = gr.Slider(
1575
  minimum=0,
1576
  maximum=1,
1577
+ label=i18n("Arama özelliği oranı:"),
1578
  value=0.66,
1579
  interactive=True,
1580
  )
1581
  vc_output2 = gr.Audio(
1582
+ label="Çıkan Ses (Çıktıysa üç noktaya tıklayıp indir butonuna tıklayarak dosyayı indirebilirsiniz.)",
1583
  type='filepath',
1584
  interactive=False,
1585
  )
1586
  animate_button.click(fn=mouth, inputs=[size, face, vc_output2, faces], outputs=[animation, preview])
1587
+ with gr.Accordion("Gelişmiş Ayarlar", open=False):
1588
  f0method0 = gr.Radio(
1589
+ label="İsteğe bağlı: Perde Çıkarma Algoritmasını Değiştirin.\nÇıkarma yöntemleri 'en kötü kalite'den 'en iyi kalite'ye doğru sıralanır.\nmangio-crepe, 'pürüzsüzlüğün' daha önemli olduğu durumlarda rmvpe'den daha iyi olabilir veya olmayabilir, ancak rmvpe genel olarak en iyisidir.",
1590
  choices=["pm", "dio", "crepe-tiny", "mangio-crepe-tiny", "crepe", "harvest", "mangio-crepe", "rmvpe"], # Fork Feature. Add Crepe-Tiny
1591
  value="rmvpe",
1592
  interactive=True,
 
1596
  minimum=1,
1597
  maximum=512,
1598
  step=1,
1599
+ label="Mangio-Crepe Atlama Uzunluğu. Daha yüksek sayılar aşırı perde değişiklikleri olasılığını azaltacak, ancak daha düşük sayılar doğruluğu artıracaktır. 64-192 denemek için iyi bir aralıktır.",
1600
  value=120,
1601
  interactive=True,
1602
  visible=False,
 
1636
  )
1637
  formanting = gr.Checkbox(
1638
  value=bool(DoFormant),
1639
+ label="[DENEYSEL] Formant kayması çıkarım sesi",
1640
+ info="Erkekten kadına ve tam tersi dönüşümler için kullanılır",
1641
  interactive=True,
1642
  visible=True,
1643
  )
 
1678
  )
1679
 
1680
  formant_preset.change(fn=preset_apply, inputs=[formant_preset, qfrency, tmbre], outputs=[qfrency, tmbre])
1681
+ frmntbut = gr.Button("Uygula", variant="primary", visible=bool(DoFormant))
1682
  formanting.change(fn=formant_enabled,inputs=[formanting,qfrency,tmbre,frmntbut,formant_preset,formant_refresh_button],outputs=[formanting,qfrency,tmbre,frmntbut,formant_preset,formant_refresh_button])
1683
  frmntbut.click(fn=formant_apply,inputs=[qfrency, tmbre], outputs=[qfrency, tmbre])
1684
  formant_refresh_button.click(fn=update_fshift_presets,inputs=[formant_preset, qfrency, tmbre],outputs=[formant_preset, qfrency, tmbre])
 
1707
  [vc_output1, vc_output2],
1708
  )
1709
 
1710
+ with gr.Accordion("Toplu Dönüştürme",open=False):
1711
  with gr.Row():
1712
  with gr.Column():
1713
  vc_transform1 = gr.Number(
1714
+ label="Transpoze (tamsayı, yarım ton sayısı, bir oktav yükselt: 12, bir oktav alçalt: -12):", value=0
1715
  )
1716
+ opt_input = gr.Textbox(label="Çıktı klasörünü belirtin", value="opt")
1717
  f0method1 = gr.Radio(
1718
+ label=
1719
+ "Perde çıkarma algoritmasını seçin, giriş vokalleri 'pm' ile hızlandırılabilir, 'harvest' iyi basa sahiptir ancak çok yavaştır, 'crepe' iyidir ancak GPU kullanımını arttırır."
1720
+ ,
1721
  choices=["pm", "harvest", "crepe", "rmvpe"],
1722
  value="rmvpe",
1723
  interactive=True,
 
1732
  )
1733
  with gr.Column():
1734
  file_index3 = gr.Textbox(
1735
+ label="Özellik alma kitaplığı dosyasının yolu, boşsa aşağı açılır seçim sonucunu kullanın:",
1736
  value="",
1737
  interactive=True,
1738
  )
1739
  file_index4 = gr.Dropdown(
1740
+ label="Dizin yolunu otomatik olarak algılayın ve açılır menüden seçin:",
1741
  choices=sorted(index_paths),
1742
  interactive=True,
1743
  )
 
1754
  index_rate2 = gr.Slider(
1755
  minimum=0,
1756
  maximum=1,
1757
+ label="Arama özelliği oranı:",
1758
  value=1,
1759
  interactive=True,
1760
  )
 
1762
  resample_sr1 = gr.Slider(
1763
  minimum=0,
1764
  maximum=48000,
1765
+ label="İşlem sonrası çıkış sesini nihai örnekleme hızına yeniden örnekleyin. Yeniden örnekleme yapmamak için 0 olarak ayarlayın:",
1766
  value=0,
1767
  step=1,
1768
  interactive=True,
 
1770
  rms_mix_rate1 = gr.Slider(
1771
  minimum=0,
1772
  maximum=1,
1773
+ label="Giriş kaynağı ses seviyesi zarfı çıkış ses seviyesi zarfı füzyon oranının yerini alır, 1'e ne kadar yakınsa çıkış zarfı o kadar fazla kullanılır",
1774
  value=1,
1775
  interactive=True,
1776
  )
1777
  protect1 = gr.Slider(
1778
  minimum=0,
1779
  maximum=0.5,
1780
+ label="Net ünsüzleri ve nefes seslerini koruyun, elektroakustik yırtılmayı ve diğer artefaktları önleyin, tam 0,5 çekildiğinde açılmaz, korumadaki artışı azaltır ancak indeksleme etkisini azaltabilir",
 
 
1781
  value=0.33,
1782
  step=0.01,
1783
  interactive=True,
1784
  )
1785
  with gr.Column():
1786
  dir_input = gr.Textbox(
1787
+ label="İşlenecek ses klasörünün yolunu girin (dosya yöneticisinin adres çubuğundan kopyalayın):",
1788
  value="E:\codes\py39\\test-20230416b\\todo-songs",
1789
  )
1790
  inputs = gr.File(
1791
+ file_count="multiple", label="Ses dosyaları ayrıca toplu olarak, iki seçimle, öncelikli okuma klasörüyle içe aktarılabilir"
1792
  )
1793
  with gr.Row():
1794
  format1 = gr.Radio(
1795
+ label="Dosya biçimini dışarı aktar",
1796
  choices=["wav", "flac", "mp3", "m4a"],
1797
  value="flac",
1798
  interactive=True,
1799
  )
1800
+ but1 = gr.Button("Dönüştür", variant="primary")
1801
+ vc_output3 = gr.Textbox(label="Çıktı bilgisi")
1802
  but1.click(
1803
  vc_multi,
1804
  [