Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,10 @@ def convert_to_wav(filename):
|
|
38 |
return new_filename
|
39 |
def g_rec(audio_File ,language):
|
40 |
r = sr.Recognizer()
|
|
|
41 |
|
42 |
-
if not os.path.splitext(audio_File)[1]==".wav":
|
43 |
-
|
44 |
hellow=sr.AudioFile(audio_File)
|
45 |
with hellow as source:
|
46 |
audio = r.record(source)
|
|
|
38 |
return new_filename
|
39 |
def g_rec(audio_File ,language):
|
40 |
r = sr.Recognizer()
|
41 |
+
print(audio_File)
|
42 |
|
43 |
+
#if not os.path.splitext(audio_File)[1]==".wav":
|
44 |
+
# audio_File=convert_to_wav(audio_File)
|
45 |
hellow=sr.AudioFile(audio_File)
|
46 |
with hellow as source:
|
47 |
audio = r.record(source)
|