Spark808 commited on
Commit
9dec28c
·
1 Parent(s): ddb9100

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -131,10 +131,7 @@ if __name__ == '__main__':
131
  )
132
  with gr.Row():
133
  with gr.Column():
134
- if args.files:
135
- vc_input = gr.Textbox(label="Input audio path")
136
- else:
137
- vc_input = gr.Audio(label="Input audio")
138
  vc_transpose = gr.Number(label="Transpose", value=0)
139
  vc_f0method = gr.Radio(
140
  label="Pitch extraction algorithm, PM is fast but Harvest is better for low frequencies",
@@ -154,4 +151,4 @@ if __name__ == '__main__':
154
  vc_output1 = gr.Textbox(label="Output Message")
155
  vc_output2 = gr.Audio(label="Output Audio")
156
  vc_submit.click(vc_fn, [vc_input, vc_transpose, vc_f0method, vc_index_ratio], [vc_output1, vc_output2])
157
- app.queue(concurrency_count=1, max_size=20, api_open=args.api).launch(share=args.share)
 
131
  )
132
  with gr.Row():
133
  with gr.Column():
134
+ vc_input = gr.Microphone(label="Record from Microphone", type="audio", preprocess=lambda x: x.get("data"))
 
 
 
135
  vc_transpose = gr.Number(label="Transpose", value=0)
136
  vc_f0method = gr.Radio(
137
  label="Pitch extraction algorithm, PM is fast but Harvest is better for low frequencies",
 
151
  vc_output1 = gr.Textbox(label="Output Message")
152
  vc_output2 = gr.Audio(label="Output Audio")
153
  vc_submit.click(vc_fn, [vc_input, vc_transpose, vc_f0method, vc_index_ratio], [vc_output1, vc_output2])
154
+ app.queue(concurrency_count=1, max_size=20, api_open=args.api).launch(share=args.share)