Skip to content

Commit

Permalink
修复gpt-sovits gradio模式下无法使用的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikaros-521 committed Feb 2, 2024
1 parent 8c37278 commit fb41a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions utils/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion utils/audio_handle/my_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fb41a9a

Please sign in to comment.