mr2along commited on
Commit
0498d1c
1 Parent(s): f15e8f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ def transcribe_audio(audio):
7
  recognizer = sr.Recognizer()
8
 
9
  # Convert audio into recognizable format for the Recognizer
10
- audio_file = sr.AudioFile(audio.name)
11
 
12
  with audio_file as source:
13
  audio_data = recognizer.record(source)
@@ -73,7 +73,7 @@ interface = gr.Interface(
73
  fn=gradio_function,
74
  inputs=[
75
  gr.Textbox(lines=5, label="Input Paragraph"),
76
- gr.Audio(type="file", label="Record Audio")
77
  ],
78
  outputs="json",
79
  title="Speech Recognition Comparison",
 
7
  recognizer = sr.Recognizer()
8
 
9
  # Convert audio into recognizable format for the Recognizer
10
+ audio_file = sr.AudioFile(audio)
11
 
12
  with audio_file as source:
13
  audio_data = recognizer.record(source)
 
73
  fn=gradio_function,
74
  inputs=[
75
  gr.Textbox(lines=5, label="Input Paragraph"),
76
+ gr.Audio(type="filepath", label="Record Audio")
77
  ],
78
  outputs="json",
79
  title="Speech Recognition Comparison",