DeepLearning101 commited on
Commit
1e25bc2
·
verified ·
1 Parent(s): 47d78dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -33,4 +33,11 @@ def transcribe(audio_file):
33
  with gr.Blocks(css=".container { max-width: 800px; margin: auto; } .gradio-app { background-color: #f0f0f0; } button { background-color: #4CAF50; color: white; }") as demo:
34
  gr.Markdown("ASR 語音語料辨識修正工具")
35
  with gr.Row():
36
-
 
 
 
 
 
 
 
 
33
  with gr.Blocks(css=".container { max-width: 800px; margin: auto; } .gradio-app { background-color: #f0f0f0; } button { background-color: #4CAF50; color: white; }") as demo:
34
  gr.Markdown("ASR 語音語料辨識修正工具")
35
  with gr.Row():
36
+ audio_input = gr.Audio(source="upload", type="filepath", label="上載你的音頻")
37
+ submit_button = gr.Button("語音識別")
38
+ output_text = gr.TextArea(label="識別結果")
39
+ download_link = gr.File(label="下載轉錄文件")
40
+
41
+ submit_button.click(fn=transcribe, inputs=audio_input, outputs=[output_text, download_link])
42
+
43
+ demo.launch()