kevinwang676 commited on
Commit
3b9c372
·
verified ·
1 Parent(s): 1fad103

Update GPT_SoVITS/app.py

Browse files
Files changed (1) hide show
  1. GPT_SoVITS/app.py +21 -13
GPT_SoVITS/app.py CHANGED
@@ -682,9 +682,10 @@ def html_left(text, label='p'):
682
 
683
 
684
  with gr.Blocks(title="GPT-SoVITS WebUI") as app:
685
- gr.Markdown(
686
- value=i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.")
687
- )
 
688
  with gr.Group():
689
  gr.Markdown(html_center(i18n("模型切换"),'h3'))
690
  with gr.Row():
@@ -694,11 +695,11 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
694
  refresh_button.click(fn=change_choices, inputs=[], outputs=[SoVITS_dropdown, GPT_dropdown])
695
  gr.Markdown(html_center(i18n("*请上传并填写参考信息"),'h3'))
696
  with gr.Row():
697
- inp_ref = gr.Audio(label=i18n("请上传3~10秒内参考音频,超过会报错!"), type="filepath", scale=13)
698
  with gr.Column(scale=13):
699
  ref_text_free = gr.Checkbox(label=i18n("开启无参考文本模式。不填参考文本亦相当于开启。"), value=False, interactive=True, show_label=True)
700
  gr.Markdown(html_left(i18n("使用无参考文本模式时建议使用微调的GPT,听不清参考音频说的啥(不晓得写啥)可以开。<br>开启后无视填写的参考文本。")))
701
- prompt_text = gr.Textbox(label=i18n("参考音频的文本"), value="", lines=3, max_lines=3)
702
  prompt_language = gr.Dropdown(
703
  label=i18n("参考音频的语种"), choices=list(dict_language.keys()), value=i18n("中文"), scale=14
704
  )
@@ -706,10 +707,10 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
706
  gr.Markdown(html_center(i18n("*请填写需要合成的目标文本和语种模式"),'h3'))
707
  with gr.Row():
708
  with gr.Column(scale=13):
709
- text = gr.Textbox(label=i18n("需要合成的文本"), value="", lines=26, max_lines=26)
710
  with gr.Column(scale=7):
711
  text_language = gr.Dropdown(
712
- label=i18n("需要合成的语种")+i18n(".限制范围越小判别效果越好。"), choices=list(dict_language.keys()), value=i18n("中文"), scale=1
713
  )
714
  how_to_cut = gr.Dropdown(
715
  label=i18n("怎么切"),
@@ -720,17 +721,17 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
720
  gr.Markdown(value=html_center(i18n("语速调整,高为更快")))
721
  if_freeze=gr.Checkbox(label=i18n("是否直接对上次合成结果调整语速和音色。防止随机性。"), value=False, interactive=True,show_label=True, scale=1)
722
  speed = gr.Slider(minimum=0.6,maximum=1.65,step=0.05,label=i18n("语速"),value=1,interactive=True, scale=1)
723
- gr.Markdown(html_center(i18n("GPT采样参数(无参考文本时不要太低。不懂就用默认):")))
724
- top_k = gr.Slider(minimum=1,maximum=100,step=1,label=i18n("top_k"),value=15,interactive=True, scale=1)
725
- top_p = gr.Slider(minimum=0,maximum=1,step=0.05,label=i18n("top_p"),value=1,interactive=True, scale=1)
726
- temperature = gr.Slider(minimum=0,maximum=1,step=0.05,label=i18n("temperature"),value=1,interactive=True, scale=1)
727
  # with gr.Column():
728
  # gr.Markdown(value=i18n("手工调整音素。当音素框不为空时使用手工音素输入推理,无视目标文本框。"))
729
  # phoneme=gr.Textbox(label=i18n("音素框"), value="")
730
  # get_phoneme_button = gr.Button(i18n("目标文本转音素"), variant="primary")
731
  with gr.Row():
732
- inference_button = gr.Button(i18n("合成语音"), variant="primary", size='lg', scale=25)
733
- output = gr.Audio(label=i18n("输出的语音"), scale=14)
734
 
735
  inference_button.click(
736
  get_tts_wav,
@@ -740,6 +741,13 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
740
  SoVITS_dropdown.change(change_sovits_weights, [SoVITS_dropdown,prompt_language,text_language], [prompt_language,text_language,prompt_text,prompt_language,text,text_language])
741
  GPT_dropdown.change(change_gpt_weights, [GPT_dropdown], [])
742
 
 
 
 
 
 
 
 
743
  # gr.Markdown(value=i18n("文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。"))
744
  # with gr.Row():
745
  # text_inp = gr.Textbox(label=i18n("需要合成的切分前文本"), value="")
 
682
 
683
 
684
  with gr.Blocks(title="GPT-SoVITS WebUI") as app:
685
+ gr.Markdown("# <center>🌊💕🎶 第二代[GPT-SoVITS](https://github.com/RVC-Boss/GPT-SoVITS) 更大更强、完美复刻</center>")
686
+ gr.Markdown("## <center>🌟 只需1分钟音频,超拟人真实声音复刻,支持中日英韩粤语,最强开源模型!</center>")
687
+ gr.Markdown("### <center>🤗 更多精彩,尽在[滔滔AI](https://www.talktalkai.com/);滔滔AI,为爱滔滔!💕</center>")
688
+
689
  with gr.Group():
690
  gr.Markdown(html_center(i18n("模型切换"),'h3'))
691
  with gr.Row():
 
695
  refresh_button.click(fn=change_choices, inputs=[], outputs=[SoVITS_dropdown, GPT_dropdown])
696
  gr.Markdown(html_center(i18n("*请上传并填写参考信息"),'h3'))
697
  with gr.Row():
698
+ inp_ref = gr.Audio(label=i18n("请上传3~10秒的参考音频,超过会报错!"), type="filepath", scale=13)
699
  with gr.Column(scale=13):
700
  ref_text_free = gr.Checkbox(label=i18n("开启无参考文本模式。不填参考文本亦相当于开启。"), value=False, interactive=True, show_label=True)
701
  gr.Markdown(html_left(i18n("使用无参考文本模式时建议使用微调的GPT,听不清参考音频说的啥(不晓得写啥)可以开。<br>开启后无视填写的参考文本。")))
702
+ prompt_text = gr.Textbox(label=i18n("参考音频对应的文本内容"), value="", lines=3, max_lines=3)
703
  prompt_language = gr.Dropdown(
704
  label=i18n("参考音频的语种"), choices=list(dict_language.keys()), value=i18n("中文"), scale=14
705
  )
 
707
  gr.Markdown(html_center(i18n("*请填写需要合成的目标文本和语种模式"),'h3'))
708
  with gr.Row():
709
  with gr.Column(scale=13):
710
+ text = gr.Textbox(label=i18n("请填写您想要合成的文本"), placeholder="想说却还没说的,还很多...", lines=6)
711
  with gr.Column(scale=7):
712
  text_language = gr.Dropdown(
713
+ label=i18n("需要合成的语种")+i18n("限制范围越小判别效果越好。"), choices=list(dict_language.keys()), value=i18n("中文"), scale=1
714
  )
715
  how_to_cut = gr.Dropdown(
716
  label=i18n("怎么切"),
 
721
  gr.Markdown(value=html_center(i18n("语速调整,高为更快")))
722
  if_freeze=gr.Checkbox(label=i18n("是否直接对上次合成结果调整语速和音色。防止随机性。"), value=False, interactive=True,show_label=True, scale=1)
723
  speed = gr.Slider(minimum=0.6,maximum=1.65,step=0.05,label=i18n("语速"),value=1,interactive=True, scale=1)
724
+ #gr.Markdown(html_center(i18n("GPT采样参数(无参考文本时不要太低。不懂就用默认):")))
725
+ top_k = gr.Slider(minimum=1,maximum=100,step=1,label=i18n("top_k"),value=15,interactive=True, scale=1, visible=False)
726
+ top_p = gr.Slider(minimum=0,maximum=1,step=0.05,label=i18n("top_p"),value=1,interactive=True, scale=1, visible=False)
727
+ temperature = gr.Slider(minimum=0,maximum=1,step=0.05,label=i18n("temperature"),value=1,interactive=True, scale=1, visible=False)
728
  # with gr.Column():
729
  # gr.Markdown(value=i18n("手工调整音素。当音素框不为空时使用手工音素输入推理,无视目标文本框。"))
730
  # phoneme=gr.Textbox(label=i18n("音素框"), value="")
731
  # get_phoneme_button = gr.Button(i18n("目标文本转音素"), variant="primary")
732
  with gr.Row():
733
+ inference_button = gr.Button(i18n("开启声音复刻之旅吧💕"), variant="primary", size='lg', scale=25)
734
+ output = gr.Audio(label=i18n("为您合成的专属音频🎶"), scale=14)
735
 
736
  inference_button.click(
737
  get_tts_wav,
 
741
  SoVITS_dropdown.change(change_sovits_weights, [SoVITS_dropdown,prompt_language,text_language], [prompt_language,text_language,prompt_text,prompt_language,text,text_language])
742
  GPT_dropdown.change(change_gpt_weights, [GPT_dropdown], [])
743
 
744
+ gr.Markdown("### <center>注意❗:请不要生成会对个人以及组织造成侵害的内容,此程序仅供科研、学习及个人娱乐使用。请自觉合规使用此程序,程序开发者不负有任何责任。</center>")
745
+ gr.HTML('''
746
+ <div class="footer">
747
+ <p>🌊🏞️🎶 - 江水东流急,滔滔无尽声。 明·顾璘
748
+ </p>
749
+ </div>
750
+ ''')
751
  # gr.Markdown(value=i18n("文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。"))
752
  # with gr.Row():
753
  # text_inp = gr.Textbox(label=i18n("需要合成的切分前文本"), value="")