Spaces:
Runtime error
Runtime error
KarthickAdopleAI
commited on
Commit
•
95d1f8b
1
Parent(s):
c4eeb10
Update app.py
Browse files
app.py
CHANGED
@@ -88,8 +88,8 @@ class VideoAnalytics:
|
|
88 |
"""Transcribe speech from an audio file."""
|
89 |
try:
|
90 |
with sr.AudioFile(path) as source:
|
91 |
-
audio_listened = r.record(source)
|
92 |
-
text = r.recognize_google(audio_listened)
|
93 |
return text
|
94 |
except sr.UnknownValueError as e:
|
95 |
logging.error(f"Speech recognition could not understand audio: {e}")
|
|
|
88 |
"""Transcribe speech from an audio file."""
|
89 |
try:
|
90 |
with sr.AudioFile(path) as source:
|
91 |
+
audio_listened = self.r.record(source)
|
92 |
+
text = self.r.recognize_google(audio_listened)
|
93 |
return text
|
94 |
except sr.UnknownValueError as e:
|
95 |
logging.error(f"Speech recognition could not understand audio: {e}")
|