Spaces:
Sleeping
Sleeping
truongghieu
commited on
Commit
•
17a0fcf
1
Parent(s):
3f8ba92
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def recognize_speech(audio_data):
|
|
22 |
except sr.RequestError as e:
|
23 |
return f"Could not request results from Google Speech Recognition service; {e}"
|
24 |
|
25 |
-
audio_input = gr.Audio(
|
26 |
|
27 |
iface = gr.Interface(fn=recognize_speech, inputs=audio_input , outputs="text")
|
28 |
iface.launch()
|
|
|
22 |
except sr.RequestError as e:
|
23 |
return f"Could not request results from Google Speech Recognition service; {e}"
|
24 |
|
25 |
+
audio_input = gr.Audio(type="numpy", sample_rate=16000)
|
26 |
|
27 |
iface = gr.Interface(fn=recognize_speech, inputs=audio_input , outputs="text")
|
28 |
iface.launch()
|