feat: whisper STT and record screen (#1363)

This commit is contained in:
Markos Gogoulos
2025-09-01 15:11:38 +03:00
committed by GitHub
parent 8cbeb72dd2
commit 817e16ac60
52 changed files with 1179 additions and 339 deletions

View File

@@ -427,6 +427,15 @@ def user_allowed_to_upload(request):
return False
def can_transcribe_video(user):
"""Checks if a user can transcribe a video."""
if is_mediacms_editor(user):
return True
if getattr(settings, 'USER_CAN_TRANSCRIBE_VIDEO', False):
return True
return False
def kill_ffmpeg_process(filepath):
"""Kill ffmpeg process that is processing a specific file
@@ -635,4 +644,6 @@ def copy_media(media_id):
def is_media_allowed_type(media):
if "all" in settings.ALLOWED_MEDIA_UPLOAD_TYPES:
return True
return media.media_type in settings.ALLOWED_MEDIA_UPLOAD_TYPES