From d4bf7c825e2941f3bb92745e8d3528df89d96a82 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 5 Apr 2026 20:07:18 +0200 Subject: [PATCH] feat: pass instruct in voice_cloning mode for accent/style influence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If instruct is set alongside ref_audio, it is now forwarded to model.generate() — allowing accent/style transfer on top of the cloned voice identity. Model may or may not honour both simultaneously. Co-Authored-By: Claude Sonnet 4.6 --- nodes/generator.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nodes/generator.py b/nodes/generator.py index 2b5686d..401a93a 100644 --- a/nodes/generator.py +++ b/nodes/generator.py @@ -142,16 +142,17 @@ class OmniVoiceGenerate: "instruct": ("STRING", { "default": "", "tooltip": ( - "Voice description for voice_design mode. Combine attributes freely.\n" + "Voice style description. Required for voice_design mode; optional in voice_cloning\n" + "mode to attempt accent/style transfer on top of the cloned voice.\n" + "Connect the OmniVoice Voice Design node for structured input.\n" "\n" "GENDER: male, female\n" "AGE: child, teenager, young adult, middle-aged, elderly\n" - "PITCH: very low, low, moderate, high, very high\n" - "STYLE: whisper\n" + "PITCH: very low pitch, low pitch, moderate pitch, high pitch, very high pitch, whisper\n" "\n" - "ENGLISH ACCENTS (text must be English):\n" - " american, british, australian, canadian,\n" - " indian, chinese, korean, japanese, portuguese, russian\n" + "ACCENT EXAMPLES:\n" + " british accent, american southern accent, indian accent,\n" + " australian accent, french accent, japanese accent ...\n" "\n" "EXAMPLE: female, high pitch, british accent" ), @@ -213,6 +214,8 @@ class OmniVoiceGenerate: kwargs["ref_audio"] = tmp_path if ref_text: kwargs["ref_text"] = ref_text + if instruct: + kwargs["instruct"] = instruct audio_tensors = model.generate(**kwargs) finally: try: