csukuangfj commited on
Commit
b977d2d
β€’
1 Parent(s): 5f1b2ca

use the latest sdk

Browse files
Files changed (2) hide show
  1. README.md +3 -3
  2. app.py +2 -4
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
  title: Automatic Speech Recognition
3
- emoji: πŸŒ–
4
  colorFrom: yellow
5
- colorTo: green
6
  sdk: gradio
7
- sdk_version: 3.48.0
8
  python_version: 3.8.9
9
  app_file: app.py
10
  pinned: false
 
1
  ---
2
  title: Automatic Speech Recognition
3
+ emoji: 🌍
4
  colorFrom: yellow
5
+ colorTo: pink
6
  sdk: gradio
7
+ sdk_version: 4.14.0
8
  python_version: 3.8.9
9
  app_file: app.py
10
  pinned: false
app.py CHANGED
@@ -278,9 +278,8 @@ with demo:
278
  with gr.Tabs():
279
  with gr.TabItem("Upload from disk"):
280
  uploaded_file = gr.Audio(
281
- source="upload", # Choose between "microphone", "upload"
282
  type="filepath",
283
- optional=False,
284
  label="Upload from disk",
285
  )
286
  upload_button = gr.Button("Submit for recognition")
@@ -302,9 +301,8 @@ with demo:
302
 
303
  with gr.TabItem("Record from microphone"):
304
  microphone = gr.Audio(
305
- source="microphone", # Choose between "microphone", "upload"
306
  type="filepath",
307
- optional=False,
308
  label="Record from microphone",
309
  )
310
 
 
278
  with gr.Tabs():
279
  with gr.TabItem("Upload from disk"):
280
  uploaded_file = gr.Audio(
281
+ sources=["upload"], # Choose between "microphone", "upload"
282
  type="filepath",
 
283
  label="Upload from disk",
284
  )
285
  upload_button = gr.Button("Submit for recognition")
 
301
 
302
  with gr.TabItem("Record from microphone"):
303
  microphone = gr.Audio(
304
+ sources=["microphone"], # Choose between "microphone", "upload"
305
  type="filepath",
 
306
  label="Record from microphone",
307
  )
308