This commit is contained in:
samiabat 2025-07-23 23:30:30 +03:00
parent 598afaaad9
commit a4c84fe892
2 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,8 @@ def synthesize(GPT_model_path, SoVITS_model_path, ref_audio_path, ref_text, ref_
print("Model weights changed successfully.")
print(f"cli file inside synthesize func: the intestity is {intensity}")
# Synthesize audio
synthesis_result = get_tts_wav(ref_wav_path=ref_audio_path,
prompt_text=ref_text,

5
api.py
View File

@ -917,6 +917,7 @@ def version_4_cli(
shouting_type="normal", # normal, loud, soft, whisper
intesity = 0,
):
print(f"version 4 cli func: the intestiy is {intesity}")
# Create a temporary buffer to store the audio
audio_buffer = io.BytesIO()
@ -1017,7 +1018,7 @@ async def tts_endpoint(
volume_scale: str = "1.0", # Accept as string from URL, convert to float
strain_effect: str = "0.0", # Accept as string from URL, convert to float
shouting_type: str = "normal", # Accept as string from URL, convert to appropriate type
intesity: int = 0,
intesity: str = "0.0",
):
if character == "kurari" or character == "Kurari":
prompt_text = "おはよう〜。今日はどんな1日過ごすーくらりはね〜いつでもあなたの味方だよ"
@ -1063,6 +1064,8 @@ async def tts_endpoint(
volume_scale = float(volume_scale)
strain_effect = float(strain_effect)
print(f"Tts endpoint func: the intesty is {intesity}")
audio_buffer, sample_rate = version_4_cli(
character_name=character,
ref_text=prompt_text,