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
+7 -12
View File
@@ -62,18 +62,13 @@ class OmniVoiceGenerate:
"default": "",
"tooltip": "Transcription of ref_audio. Connect a Whisper (or other STT) node for best results.",
}),
"language": (
["auto", "English", "Chinese"],
{
"default": "auto",
"tooltip": (
"Used in voice_design mode to select the instruct vocabulary.\n"
"'English' uses English instruct items (male, female, british accent …)\n"
"'Chinese' uses Chinese dialect items (男, 女, 四川话, 东北话 …)\n"
"Has no effect in voice_cloning mode (language is inferred from text)."
),
},
),
"language": ("STRING", {
"default": "auto",
"tooltip": (
"Connect the 'language' output from OmniVoice Voice Design — it sets this automatically.\n"
"Only needed in voice_design/auto_voice mode. Leave 'auto' for voice_cloning."
),
}),
"instruct": ("STRING", {
"default": "",
"tooltip": (
+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")