Spaces:
Sleeping
Sleeping
truongghieu
commited on
Commit
•
c143727
1
Parent(s):
29a3355
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import speech_recognition as sr
|
2 |
import gradio as gr
|
3 |
def recognize_speech(audio_data):
|
4 |
-
audio_data = sr.AudioData(audio_data, sample_rate=16000)
|
5 |
recognizer = sr.Recognizer()
|
6 |
|
7 |
try:
|
|
|
1 |
import speech_recognition as sr
|
2 |
import gradio as gr
|
3 |
def recognize_speech(audio_data):
|
4 |
+
audio_data = sr.AudioData(audio_data, sample_rate=16000,sample_width=2)
|
5 |
recognizer = sr.Recognizer()
|
6 |
|
7 |
try:
|