maahikachitagi commited on
Commit
a2529ad
·
verified ·
1 Parent(s): 08bb4e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -14,6 +14,9 @@ whisper_model = whisper.load_model("base")
14
 
15
  # Whisper transcription function
16
  def transcribe_audio(file_path):
 
 
 
17
  try:
18
  audio = AudioSegment.from_file(file_path)
19
  converted_path = "converted.wav"
 
14
 
15
  # Whisper transcription function
16
  def transcribe_audio(file_path):
17
+ if file_path is None: # 🔧 THIS LINE FIXED YOUR BUG
18
+ return "❌ No audio file provided."
19
+
20
  try:
21
  audio = AudioSegment.from_file(file_path)
22
  converted_path = "converted.wav"