From df33574a26adbe15dbc541431624d7c16aae779d Mon Sep 17 00:00:00 2001 From: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com> Date: Sat, 1 Mar 2025 19:17:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B6=85=E5=88=86=E5=90=8E?= =?UTF-8?q?=E9=9F=B3=E9=87=8F=E8=B6=85=E8=BF=871=E5=86=99=E9=94=99?= =?UTF-8?q?=E4=BA=86=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复超分后音量超过1写错了的bug --- GPT_SoVITS/inference_webui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index 03b8e34..e5a8a60 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -704,7 +704,7 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language, print(i18n("音频超分中")) audio_opt,sr=audio_sr(audio_opt.unsqueeze(0),sr) max_audio=np.abs(audio_opt).max() - if max_audio > 1: audio /= max_audio + if max_audio > 1: audio_opt /= max_audio else: audio_opt=audio_opt.cpu().detach().numpy() yield sr, (audio_opt * 32767).astype(np.int16)