Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"
|