From 3a680f3a1dbc94e0130ae67c92378c08e8fc2bb5 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 24 Jan 2025 12:10:35 +0530 Subject: [PATCH] expose model to manage command --- management/commands/transcribe.py | 2 ++ transcribe.py | 1 + 2 files changed, 3 insertions(+) diff --git a/management/commands/transcribe.py b/management/commands/transcribe.py index 8bf1e95..4350251 100644 --- a/management/commands/transcribe.py +++ b/management/commands/transcribe.py @@ -21,6 +21,8 @@ class Command(BaseCommand): default=None, help='import into layer (default subtitle layer)') parser.add_argument('--translate', type=str, dest='translate', default='', help='list of languages to translate: (i.e. hi:en,de:en') + parser.add_argument('--model', type=str, dest='model', + default='small', help='whisper model (small, large-v3-turbo, default: small)') parser.add_argument('--gpu', action='store_true', dest='gpu', default=False, help='user GPU (default: disabled)') parser.add_argument('--join-sentences', action='store_true', dest='join_sentences', diff --git a/transcribe.py b/transcribe.py index 186f0e0..fcce57f 100644 --- a/transcribe.py +++ b/transcribe.py @@ -241,6 +241,7 @@ def main(**kwargs): translate, kwargs.get("gpu"), join_sentences=kwargs.get("join_sentences"), + model=kwargs.get("model", "small") ): done.items.add(item) queue.items.remove(item)