feat: pass instruct in voice_cloning mode for accent/style influence
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 <noreply@anthropic.com>
This commit is contained in:
+9
-6
@@ -142,16 +142,17 @@ class OmniVoiceGenerate:
|
|||||||
"instruct": ("STRING", {
|
"instruct": ("STRING", {
|
||||||
"default": "",
|
"default": "",
|
||||||
"tooltip": (
|
"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"
|
"\n"
|
||||||
"GENDER: male, female\n"
|
"GENDER: male, female\n"
|
||||||
"AGE: child, teenager, young adult, middle-aged, elderly\n"
|
"AGE: child, teenager, young adult, middle-aged, elderly\n"
|
||||||
"PITCH: very low, low, moderate, high, very high\n"
|
"PITCH: very low pitch, low pitch, moderate pitch, high pitch, very high pitch, whisper\n"
|
||||||
"STYLE: whisper\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"ENGLISH ACCENTS (text must be English):\n"
|
"ACCENT EXAMPLES:\n"
|
||||||
" american, british, australian, canadian,\n"
|
" british accent, american southern accent, indian accent,\n"
|
||||||
" indian, chinese, korean, japanese, portuguese, russian\n"
|
" australian accent, french accent, japanese accent ...\n"
|
||||||
"\n"
|
"\n"
|
||||||
"EXAMPLE: female, high pitch, british accent"
|
"EXAMPLE: female, high pitch, british accent"
|
||||||
),
|
),
|
||||||
@@ -213,6 +214,8 @@ class OmniVoiceGenerate:
|
|||||||
kwargs["ref_audio"] = tmp_path
|
kwargs["ref_audio"] = tmp_path
|
||||||
if ref_text:
|
if ref_text:
|
||||||
kwargs["ref_text"] = ref_text
|
kwargs["ref_text"] = ref_text
|
||||||
|
if instruct:
|
||||||
|
kwargs["instruct"] = instruct
|
||||||
audio_tensors = model.generate(**kwargs)
|
audio_tensors = model.generate(**kwargs)
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user