From cb49d8dae05f0c50d023358b3b61907bc1b8d5cb Mon Sep 17 00:00:00 2001 From: luzhixing12345 Date: Thu, 30 Apr 2026 07:22:50 -0400 Subject: [PATCH] fix: add whisper-cpp model cli args support --- videocaptioner/cli/commands/transcribe.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/videocaptioner/cli/commands/transcribe.py b/videocaptioner/cli/commands/transcribe.py index e2df297c..13df571c 100644 --- a/videocaptioner/cli/commands/transcribe.py +++ b/videocaptioner/cli/commands/transcribe.py @@ -92,8 +92,10 @@ def run(args: Namespace, config: dict) -> int: vad_map = {v.value.replace("_", "-"): v for v in VadMethodEnum} vad_enum = vad_map.get(vad_str.replace("_", "-")) - # WhisperCpp model enum - wcpp_model_str = get(config, "transcribe.whisper_cpp.model", "large-v2") + # Prefer explicit CLI override for whisper-cpp model selection. + wcpp_model_str = getattr(args, "whisper_model", None) or get( + config, "transcribe.whisper_cpp.model", "large-v2" + ) wcpp_model_enum = next((m for m in WhisperModelEnum if m.value == wcpp_model_str), None) transcribe_config = TranscribeConfig(