From 8d77dd6cd5ab615308ba7f675a8037be360380f4 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 5 Apr 2026 17:49:25 +0200 Subject: [PATCH] Remove torchcodec workaround; recommend Whisper node for ref_text Users should connect a ComfyUI Whisper node to ref_text instead of relying on omnivoice's internal ASR. Removes the error-catch workaround and updates the tooltip accordingly. Co-Authored-By: Claude Sonnet 4.6 --- nodes/generator.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/nodes/generator.py b/nodes/generator.py index 508b4a7..82de292 100644 --- a/nodes/generator.py +++ b/nodes/generator.py @@ -60,7 +60,7 @@ class OmniVoiceGenerate: }), "ref_text": ("STRING", { "default": "", - "tooltip": "Transcription of ref_audio. Strongly recommended: type it manually. Auto-transcription requires FFmpeg shared libraries; if absent (e.g. some Docker images), generation will fail with a clear error message.", + "tooltip": "Transcription of ref_audio. Connect a Whisper (or other STT) node for best results.", }), "instruct": ("STRING", { "default": "", @@ -115,16 +115,7 @@ class OmniVoiceGenerate: kwargs["ref_audio"] = tmp_path if ref_text: kwargs["ref_text"] = ref_text - try: - audio_tensors = model.generate(**kwargs) - except RuntimeError as e: - if "torchcodec" in str(e).lower() or "libtorchcodec" in str(e).lower(): - raise RuntimeError( - "Auto-transcription of the reference audio failed because FFmpeg is not " - "available in this environment (required by transformers 5.x for Whisper ASR). " - "Fix: type the transcript of your reference audio into the ref_text field." - ) from None - raise + audio_tensors = model.generate(**kwargs) finally: try: os.unlink(tmp_path)