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:
+4
-9
@@ -62,18 +62,13 @@ class OmniVoiceGenerate:
|
|||||||
"default": "",
|
"default": "",
|
||||||
"tooltip": "Transcription of ref_audio. Connect a Whisper (or other STT) node for best results.",
|
"tooltip": "Transcription of ref_audio. Connect a Whisper (or other STT) node for best results.",
|
||||||
}),
|
}),
|
||||||
"language": (
|
"language": ("STRING", {
|
||||||
["auto", "English", "Chinese"],
|
|
||||||
{
|
|
||||||
"default": "auto",
|
"default": "auto",
|
||||||
"tooltip": (
|
"tooltip": (
|
||||||
"Used in voice_design mode to select the instruct vocabulary.\n"
|
"Connect the 'language' output from OmniVoice Voice Design — it sets this automatically.\n"
|
||||||
"'English' uses English instruct items (male, female, british accent …)\n"
|
"Only needed in voice_design/auto_voice mode. Leave 'auto' for voice_cloning."
|
||||||
"'Chinese' uses Chinese dialect items (男, 女, 四川话, 东北话 …)\n"
|
|
||||||
"Has no effect in voice_cloning mode (language is inferred from text)."
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
|
}),
|
||||||
"instruct": ("STRING", {
|
"instruct": ("STRING", {
|
||||||
"default": "",
|
"default": "",
|
||||||
"tooltip": (
|
"tooltip": (
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class OmniVoiceVoiceDesign:
|
|||||||
["English", "Chinese"],
|
["English", "Chinese"],
|
||||||
{
|
{
|
||||||
"default": "English",
|
"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",
|
"gender": (cls.GENDERS, {"default": "female",
|
||||||
@@ -59,8 +59,8 @@ class OmniVoiceVoiceDesign:
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_TYPES = ("STRING",)
|
RETURN_TYPES = ("STRING", "STRING")
|
||||||
RETURN_NAMES = ("instruct",)
|
RETURN_NAMES = ("instruct", "language")
|
||||||
FUNCTION = "compose"
|
FUNCTION = "compose"
|
||||||
CATEGORY = "OmniVoice"
|
CATEGORY = "OmniVoice"
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class OmniVoiceVoiceDesign:
|
|||||||
zh_gender="none", zh_age="none", zh_pitch="none", zh_dialect="none"):
|
zh_gender="none", zh_age="none", zh_pitch="none", zh_dialect="none"):
|
||||||
if language == "Chinese":
|
if language == "Chinese":
|
||||||
parts = [v for v in [zh_gender, zh_age, zh_pitch, zh_dialect] if v != "none"]
|
parts = [v for v in [zh_gender, zh_age, zh_pitch, zh_dialect] if v != "none"]
|
||||||
return (",".join(parts),)
|
return (",".join(parts), "Chinese")
|
||||||
else:
|
else:
|
||||||
parts = [v for v in [gender, age, pitch, accent] if v != "none"]
|
parts = [v for v in [gender, age, pitch, accent] if v != "none"]
|
||||||
return (", ".join(parts),)
|
return (", ".join(parts), "English")
|
||||||
|
|||||||
Reference in New Issue
Block a user