Feat: give tone for sythesize (WIP for better UX)

This commit is contained in:
litagin02
2024-01-08 10:48:28 +09:00
parent 425e374240
commit 477b0a8eb0
6 changed files with 35 additions and 5 deletions

View File

@@ -95,6 +95,7 @@ class Model:
use_assist_text: bool = False,
style: str = DEFAULT_STYLE,
style_weight: float = DEFAULT_STYLE_WEIGHT,
given_tone: Optional[list[int]] = None,
) -> tuple[int, np.ndarray]:
logger.info(f"Start generating audio data from text:\n{text}")
if reference_audio_path == "":
@@ -127,6 +128,7 @@ class Model:
assist_text=assist_text,
assist_text_weight=assist_text_weight,
style_vec=style_vector,
given_tone=given_tone,
)
else:
texts = text.split("\n")