"""Audio file handling utilities.""" ALLOWED_AUDIO_TYPES = [ "audio/webm", "audio/ogg", "audio/wav", "audio/mpeg", "audio/mp4", ] def validate_audio_type(content_type: str | None) -> bool: """Check if the uploaded file has a valid audio content type.""" if not content_type: return True # Allow if no content type (browser may not send it) return content_type in ALLOWED_AUDIO_TYPES