Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,6 +78,11 @@ def transcribe_audio(file_path):
|
|
78 |
:param file_path: Path to the audio file.
|
79 |
:return: Transcribed text.
|
80 |
"""
|
|
|
|
|
|
|
|
|
|
|
81 |
recognizer = sr.Recognizer()
|
82 |
transcription = ""
|
83 |
|
|
|
78 |
:param file_path: Path to the audio file.
|
79 |
:return: Transcribed text.
|
80 |
"""
|
81 |
+
|
82 |
+
# Check if the file exists
|
83 |
+
if not os.path.exists(file_path):
|
84 |
+
raise FileNotFoundError(f"The file {file_path} does not exist.")
|
85 |
+
|
86 |
recognizer = sr.Recognizer()
|
87 |
transcription = ""
|
88 |
|