DeepLearning101 commited on
Commit
2e23895
·
verified ·
1 Parent(s): 16355cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -98,9 +98,11 @@ def transcribe(file_upload, microphone):
98
  demo = gr.Interface(
99
  fn=transcribe,
100
  inputs=[
101
- gr.Audio(type="filepath", label="語音質檢原始音檔"),
 
 
 
102
  ],
103
- outputs=gr.Audio(type="filepath", label="Output"),
104
  title="<h1>語音質檢/噪音去除 (語音增強)</h1>",
105
  description="""<h2><a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D.</a> | <a href='https://blog.twman.org/p/deeplearning101.html' target='_blank'>手把手帶你一起踩AI坑</a><br></h2><br>
106
  為了提升語音識別的效果,可以在識別前先進行噪音去除<br>
 
98
  demo = gr.Interface(
99
  fn=transcribe,
100
  inputs=[
101
+ gr.Audio(type="filepath", label="語音質檢原始音檔", sources=["upload", "microphone"]) # 顯式指定來源
102
+ ],
103
+ outputs=[
104
+ gr.Audio(type="filepath", label="Output") # 保持列表形式
105
  ],
 
106
  title="<h1>語音質檢/噪音去除 (語音增強)</h1>",
107
  description="""<h2><a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D.</a> | <a href='https://blog.twman.org/p/deeplearning101.html' target='_blank'>手把手帶你一起踩AI坑</a><br></h2><br>
108
  為了提升語音識別的效果,可以在識別前先進行噪音去除<br>