Spaces:
Sleeping
Sleeping
Antoniskaraolis
commited on
Commit
·
32b3d3b
1
Parent(s):
c287037
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
import speech_recognition as sr
|
3 |
|
4 |
def transcribe_audio(file_info):
|
5 |
recognizer = sr.Recognizer()
|
6 |
-
audio_file = file_info
|
7 |
|
8 |
with sr.AudioFile(audio_file) as source:
|
9 |
audio_data = recognizer.record(source)
|
@@ -15,7 +15,7 @@ def transcribe_audio(file_info):
|
|
15 |
|
16 |
iface = gr.Interface(
|
17 |
fn=transcribe_audio,
|
18 |
-
inputs=
|
19 |
outputs="text"
|
20 |
)
|
21 |
|
|
|
1 |
import gradio as gr
|
2 |
+
import speech_recognition as sr
|
3 |
|
4 |
def transcribe_audio(file_info):
|
5 |
recognizer = sr.Recognizer()
|
6 |
+
audio_file = file_info
|
7 |
|
8 |
with sr.AudioFile(audio_file) as source:
|
9 |
audio_data = recognizer.record(source)
|
|
|
15 |
|
16 |
iface = gr.Interface(
|
17 |
fn=transcribe_audio,
|
18 |
+
inputs="audio",
|
19 |
outputs="text"
|
20 |
)
|
21 |
|