feat: add Voice Design node + language and guidance_scale to Generate
OmniVoiceVoiceDesign: structured dropdowns for gender/age/pitch/accent that compose into an instruct string — wire to Generate's instruct input. OmniVoiceGenerate: new optional language dropdown (auto + 11 languages) and guidance_scale (CFG, default 2.0) parameters. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
class OmniVoiceVoiceDesign:
|
||||
"""Compose a voice design instruct string from structured dropdowns."""
|
||||
|
||||
GENDERS = ["none", "male", "female"]
|
||||
AGES = ["none", "child", "teenager", "young adult", "middle-aged", "elderly"]
|
||||
PITCHES = ["none", "very low pitch", "low pitch", "moderate pitch", "high pitch", "very high pitch", "whisper"]
|
||||
ACCENTS = [
|
||||
"none",
|
||||
"american accent", "british accent", "australian accent", "canadian accent",
|
||||
"indian accent", "chinese accent", "japanese accent", "korean accent",
|
||||
"portuguese accent", "russian accent",
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"gender": (cls.GENDERS, {"default": "female"}),
|
||||
"age": (cls.AGES, {"default": "none"}),
|
||||
"pitch": (cls.PITCHES, {"default": "none"}),
|
||||
"accent": (cls.ACCENTS, {"default": "none"}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING",)
|
||||
RETURN_NAMES = ("instruct",)
|
||||
FUNCTION = "compose"
|
||||
CATEGORY = "OmniVoice"
|
||||
|
||||
def compose(self, gender, age, pitch, accent):
|
||||
parts = [v for v in [gender, age, pitch, accent] if v != "none"]
|
||||
return (", ".join(parts),)
|
||||
Reference in New Issue
Block a user