From ed3abd5fd591089736b891dccffbb04c871c0290 Mon Sep 17 00:00:00 2001 From: XTer Date: Sun, 10 Mar 2024 21:01:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=B5=81=E5=BC=8F=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=80=81=E4=BF=AE=E6=AD=A3TTS=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0 一键启动脚本/.gitignore | 1 + GPT_SoVITS/TTS_infer_pack/TTS.py | 9 ++++++--- Inference | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 0 一键启动脚本/.gitignore diff --git a/0 一键启动脚本/.gitignore b/0 一键启动脚本/.gitignore new file mode 100644 index 00000000..c68174d6 --- /dev/null +++ b/0 一键启动脚本/.gitignore @@ -0,0 +1 @@ +Cfg/ \ No newline at end of file diff --git a/GPT_SoVITS/TTS_infer_pack/TTS.py b/GPT_SoVITS/TTS_infer_pack/TTS.py index 7cfaf46b..9cc54911 100644 --- a/GPT_SoVITS/TTS_infer_pack/TTS.py +++ b/GPT_SoVITS/TTS_infer_pack/TTS.py @@ -650,9 +650,12 @@ class TTS: else: audio = [item for batch in audio for item in batch] - - audio = np.concatenate(audio, 0) - audio = (audio * 32768).astype(np.int16) + if type(audio) == list: + audio = np.array(audio) + audio = (audio * 32768).astype(np.int16) + else: + audio = np.concatenate(audio, 0) + audio = (audio * 32768).astype(np.int16) try: if speed_factor != 1.0: diff --git a/Inference b/Inference index 0800287f..39118a4e 160000 --- a/Inference +++ b/Inference @@ -1 +1 @@ -Subproject commit 0800287fc279b7568c6948d742fac78280ddb0dd +Subproject commit 39118a4e07c66690e33be6ec8a90652b7dd2a432