litellm / services /whisper /utils /validators.py
Ava2lon's picture
Upload 205 files
1425afc verified
Raw
History Blame Contribute Delete
274 Bytes
import os
ALLOWED = [".mp4", ".mov", ".mkv"]
def validate_video(path):
if not os.path.exists(path):
raise Exception("File not found")
ext = os.path.splitext(path)[1].lower()
if ext not in ALLOWED:
raise Exception("Unsupported video format")