Naozumi0512 commited on
Commit
e34a81a
·
1 Parent(s): 63f41a9
Files changed (2) hide show
  1. app.py +13 -6
  2. configs/config.json +1 -1
app.py CHANGED
@@ -403,7 +403,7 @@ if __name__ == "__main__":
403
  slicer = gr.Button("快速切分", variant="primary")
404
  formatter = gr.Button("检测语言,并整理为 MIX 格式", variant="primary")
405
  speaker = gr.Dropdown(
406
- choices=["MK妹 (mkmui)"], value="MK妹 (mkmui)", label="Speaker"
407
  )
408
  _ = gr.Markdown(
409
  value="提示模式(Prompt mode):可选文字提示或音频提示,用于生成文字或音频指定风格的声音。\n",
@@ -477,7 +477,10 @@ if __name__ == "__main__":
477
  )
478
  slicer = gr.Button("切分生成", variant="primary")
479
  text_output = gr.Textbox(label="状态信息")
480
- audio_output = gr.Audio(label="输出音频", value="https://github.com/Naozumi520/Bert-VITS2-Yue/raw/master/sample.wav")
 
 
 
481
  # explain_image = gr.Image(
482
  # label="参数解释信息",
483
  # show_label=True,
@@ -489,7 +492,7 @@ if __name__ == "__main__":
489
  tts_fn,
490
  inputs=[
491
  text,
492
- "Yue",
493
  sdp_ratio,
494
  noise_scale,
495
  noise_scale_w,
@@ -513,7 +516,7 @@ if __name__ == "__main__":
513
  tts_split,
514
  inputs=[
515
  text,
516
- "Yue",
517
  sdp_ratio,
518
  noise_scale,
519
  noise_scale_w,
@@ -544,10 +547,14 @@ if __name__ == "__main__":
544
 
545
  formatter.click(
546
  format_utils,
547
- inputs=[text, "Yue"],
548
  outputs=[language, text],
549
  )
550
 
551
  print("推理页面已开启!")
552
  webbrowser.open(f"http://127.0.0.1:{config.webui_config.port}")
553
- app.launch(share=config.webui_config.share, server_name="0.0.0.0", server_port=config.webui_config.port)
 
 
 
 
 
403
  slicer = gr.Button("快速切分", variant="primary")
404
  formatter = gr.Button("检测语言,并整理为 MIX 格式", variant="primary")
405
  speaker = gr.Dropdown(
406
+ choices=speakers, value=speakers[0], label="Speaker"
407
  )
408
  _ = gr.Markdown(
409
  value="提示模式(Prompt mode):可选文字提示或音频提示,用于生成文字或音频指定风格的声音。\n",
 
477
  )
478
  slicer = gr.Button("切分生成", variant="primary")
479
  text_output = gr.Textbox(label="状态信息")
480
+ audio_output = gr.Audio(
481
+ label="输出音频",
482
+ value="https://github.com/Naozumi520/Bert-VITS2-Yue/raw/master/sample.wav",
483
+ )
484
  # explain_image = gr.Image(
485
  # label="参数解释信息",
486
  # show_label=True,
 
492
  tts_fn,
493
  inputs=[
494
  text,
495
+ speaker,
496
  sdp_ratio,
497
  noise_scale,
498
  noise_scale_w,
 
516
  tts_split,
517
  inputs=[
518
  text,
519
+ speaker,
520
  sdp_ratio,
521
  noise_scale,
522
  noise_scale_w,
 
547
 
548
  formatter.click(
549
  format_utils,
550
+ inputs=[text, speaker],
551
  outputs=[language, text],
552
  )
553
 
554
  print("推理页面已开启!")
555
  webbrowser.open(f"http://127.0.0.1:{config.webui_config.port}")
556
+ app.launch(
557
+ share=config.webui_config.share,
558
+ server_name="0.0.0.0",
559
+ server_port=config.webui_config.port,
560
+ )
configs/config.json CHANGED
@@ -40,7 +40,7 @@
40
  "n_speakers": 1,
41
  "cleaned_text": true,
42
  "spk2id": {
43
- "Yue": 0
44
  }
45
  },
46
  "model": {
 
40
  "n_speakers": 1,
41
  "cleaned_text": true,
42
  "spk2id": {
43
+ "MK妹 (mkmui)": 0
44
  }
45
  },
46
  "model": {