AiMimicry commited on
Commit
e0c3ca5
·
1 Parent(s): 989adde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py CHANGED
@@ -64,12 +64,6 @@ def create_vc_fn(model, sid):
64
  return "Success", (44100, out_audio.cpu().numpy())
65
  return vc_fn
66
 
67
- def change_to_tts_mode(tts_mode):
68
- if tts_mode:
69
- return gr.Audio.update(visible=False), gr.Textbox.update(visible=True), gr.Dropdown.update(visible=True), gr.Checkbox.update(value=True)
70
- else:
71
- return gr.Audio.update(visible=True), gr.Textbox.update(visible=False), gr.Dropdown.update(visible=False), gr.Checkbox.update(value=False)
72
-
73
  if __name__ == '__main__':
74
  parser = argparse.ArgumentParser()
75
  parser.add_argument('--device', type=str, default='cpu')
@@ -78,12 +72,6 @@ if __name__ == '__main__':
78
  args = parser.parse_args()
79
  hubert_model = utils.get_hubert_model().to(args.device)
80
  models = []
81
- others = {
82
- "rudolf": "https://huggingface.co/spaces/sayashi/sovits-rudolf",
83
- "teio": "https://huggingface.co/spaces/sayashi/sovits-teio",
84
- "goldship": "https://huggingface.co/spaces/sayashi/sovits-goldship",
85
- "tannhauser": "https://huggingface.co/spaces/sayashi/sovits-tannhauser"
86
- }
87
  voices = []
88
  tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices())
89
  for r in tts_voice_list:
@@ -97,11 +85,7 @@ if __name__ == '__main__':
97
  gr.Markdown(
98
  "# <center> Sovits Models\n"
99
  "## <center> The input audio should be clean and pure voice without background music.\n"
100
- "![visitor badge](https://visitor-badge.glitch.me/badge?page_id=sayashi.Sovits-Umamusume)\n\n"
101
- "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1wfsBbMzmtLflOJeqc5ZnJiLY7L239hJW?usp=share_link)\n\n"
102
- "[![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm-dark.svg)](https://huggingface.co/spaces/sayashi/sovits-models?duplicate=true)\n\n"
103
  "[![Original Repo](https://badgen.net/badge/icon/github?icon=github&label=Original%20Repo)](https://github.com/svc-develop-team/so-vits-svc)"
104
-
105
  )
106
  with gr.Tabs():
107
  for (name, cover, vc_fn) in models:
@@ -125,7 +109,6 @@ if __name__ == '__main__':
125
  vc_output1 = gr.Textbox(label="Output Message")
126
  vc_output2 = gr.Audio(label="Output Audio")
127
  vc_submit.click(vc_fn, [vc_input, vc_transform, auto_f0, tts_text, tts_voice, tts_mode], [vc_output1, vc_output2])
128
- tts_mode.change(change_to_tts_mode, [tts_mode], [vc_input, tts_text, tts_voice, auto_f0])
129
  for category, link in others.items():
130
  with gr.TabItem(category):
131
  gr.Markdown(
 
64
  return "Success", (44100, out_audio.cpu().numpy())
65
  return vc_fn
66
 
 
 
 
 
 
 
67
  if __name__ == '__main__':
68
  parser = argparse.ArgumentParser()
69
  parser.add_argument('--device', type=str, default='cpu')
 
72
  args = parser.parse_args()
73
  hubert_model = utils.get_hubert_model().to(args.device)
74
  models = []
 
 
 
 
 
 
75
  voices = []
76
  tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices())
77
  for r in tts_voice_list:
 
85
  gr.Markdown(
86
  "# <center> Sovits Models\n"
87
  "## <center> The input audio should be clean and pure voice without background music.\n"
 
 
 
88
  "[![Original Repo](https://badgen.net/badge/icon/github?icon=github&label=Original%20Repo)](https://github.com/svc-develop-team/so-vits-svc)"
 
89
  )
90
  with gr.Tabs():
91
  for (name, cover, vc_fn) in models:
 
109
  vc_output1 = gr.Textbox(label="Output Message")
110
  vc_output2 = gr.Audio(label="Output Audio")
111
  vc_submit.click(vc_fn, [vc_input, vc_transform, auto_f0, tts_text, tts_voice, tts_mode], [vc_output1, vc_output2])
 
112
  for category, link in others.items():
113
  with gr.TabItem(category):
114
  gr.Markdown(