From fb41a9a0ae74bd8d3ae6a810c6b904d0b94fb2f3 Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Fri, 2 Feb 2024 22:23:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgpt-sovits=20gradio=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/audio.py | 2 ++ utils/audio_handle/my_tts.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/audio.py b/utils/audio.py index 99e82981..4dd13146 100644 --- a/utils/audio.py +++ b/utils/audio.py @@ -724,6 +724,7 @@ async def voice_change_and_put_to_queue(message, voice_tmp_path): data = { "type": message["data"]["type"], + "ws_ip_port": message["data"]["ws_ip_port"], "api_ip_port": message["data"]["api_ip_port"], "ref_audio_path": message["data"]["ref_audio_path"], "prompt_text": message["data"]["prompt_text"], @@ -1482,6 +1483,7 @@ async def voice_change_and_put_to_queue(voice_tmp_path): data = { "type": self.config.get("gpt_sovits", "type"), + "ws_ip_port": self.config.get("gpt_sovits", "ws_ip_port"), "api_ip_port": self.config.get("gpt_sovits", "api_ip_port"), "ref_audio_path": self.config.get("gpt_sovits", "ref_audio_path"), "prompt_text": self.config.get("gpt_sovits", "prompt_text"), diff --git a/utils/audio_handle/my_tts.py b/utils/audio_handle/my_tts.py index 729a1ff3..8545f5b3 100644 --- a/utils/audio_handle/my_tts.py +++ b/utils/audio_handle/my_tts.py @@ -546,7 +546,7 @@ def file_to_data_url(file_path): async def websocket_client(data_json): try: - async with websockets.connect(data["api_ip_port"]) as websocket: + async with websockets.connect(data["ws_ip_port"]) as websocket: # 设置最大连接时长(例如 30 秒) return await asyncio.wait_for(websocket_client_logic(websocket, data_json), timeout=30) except asyncio.TimeoutError: