kenshin20080 commited on
Commit
b3a87ea
1 Parent(s): f00ac14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,7 +43,7 @@ def create_vc_fn(model, sid):
43
  out_wav_path = "temp.wav"
44
  soundfile.write(out_wav_path, audio, 16000, format="wav")
45
  out_audio, out_sr = model.infer(sid, vc_transform, out_wav_path,
46
- auto_predict_f0=auto_f0, F0_mean_pooling=True
47
  )
48
  return "Success", (44100, out_audio.cpu().numpy())
49
  return vc_fn
@@ -82,14 +82,14 @@ if __name__ == '__main__':
82
  )
83
  with gr.Row():
84
  with gr.Column():
85
- vc_input = gr.Audio(label="Input audio"+' (less than 45 seconds)' if limitation else '')
86
  vc_transform = gr.Number(label="vc_transform", value=0)
87
  auto_f0 = gr.Checkbox(label="auto_f0", value=False)
88
  vc_submit = gr.Button("Generate", variant="primary")
89
  with gr.Column():
90
  vc_output1 = gr.Textbox(label="Output Message")
91
  vc_output2 = gr.Audio(label="Output Audio")
92
- vc_submit.click(vc_fn, [vc_input, vc_transform, auto_f0], [vc_output1, vc_output2])
93
  if args.colab:
94
  webbrowser.open("http://127.0.0.1:7860")
95
  app.queue(concurrency_count=1, api_open=args.api).launch(share=args.share)
 
43
  out_wav_path = "temp.wav"
44
  soundfile.write(out_wav_path, audio, 16000, format="wav")
45
  out_audio, out_sr = model.infer(sid, vc_transform, out_wav_path,
46
+ auto_predict_f0=auto_f0, F0_mean_pooling=True,
47
  )
48
  return "Success", (44100, out_audio.cpu().numpy())
49
  return vc_fn
 
82
  )
83
  with gr.Row():
84
  with gr.Column():
85
+ vc_input = gr.Audio(label="Input audio"+' (less than 120 seconds)' if limitation else '')
86
  vc_transform = gr.Number(label="vc_transform", value=0)
87
  auto_f0 = gr.Checkbox(label="auto_f0", value=False)
88
  vc_submit = gr.Button("Generate", variant="primary")
89
  with gr.Column():
90
  vc_output1 = gr.Textbox(label="Output Message")
91
  vc_output2 = gr.Audio(label="Output Audio")
92
+ vc_submit.click(vc_fn, [vc_input, vc_transform, auto_f0, True], [vc_output1, vc_output2])
93
  if args.colab:
94
  webbrowser.open("http://127.0.0.1:7860")
95
  app.queue(concurrency_count=1, api_open=args.api).launch(share=args.share)