fix: pipe language out of Voice Design into Generate

Voice Design now outputs (instruct, language) — wire language directly
into Generate to avoid setting it in two places. Generate's language
input is now a STRING (accepts the connection or manual 'auto').

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 20:40:35 +02:00
parent 86ec8cf3fb
commit 2b13e55dc5
2 changed files with 12 additions and 17 deletions
+5 -5
View File
@@ -39,7 +39,7 @@ class OmniVoiceVoiceDesign:
["English", "Chinese"],
{
"default": "English",
"tooltip": "Selects the instruct vocabulary. Must match the language set in OmniVoice Generate.",
"tooltip": "Selects the instruct vocabulary. The language output wires directly into Generate — no need to set it there too.",
},
),
"gender": (cls.GENDERS, {"default": "female",
@@ -59,8 +59,8 @@ class OmniVoiceVoiceDesign:
},
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("instruct",)
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("instruct", "language")
FUNCTION = "compose"
CATEGORY = "OmniVoice"
@@ -68,7 +68,7 @@ class OmniVoiceVoiceDesign:
zh_gender="none", zh_age="none", zh_pitch="none", zh_dialect="none"):
if language == "Chinese":
parts = [v for v in [zh_gender, zh_age, zh_pitch, zh_dialect] if v != "none"]
return ("".join(parts),)
return ("".join(parts), "Chinese")
else:
parts = [v for v in [gender, age, pitch, accent] if v != "none"]
return (", ".join(parts),)
return (", ".join(parts), "English")