it4xperts commited on
Commit
48e1893
1 Parent(s): 77f9756

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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