#1880 GPT-SoVITS 服务启动显示Running on local URL: http://0.0.0.0:9874,怎么修改端口成http://127.0.0.1:9880

23.165* Posted at: 1 hour ago 👁7

GPT-SoVITS 服务启动显示Running on local URL: http://0.0.0.0:9874,怎么修改端口成http://127.0.0.1:9880

1 Replies

要修改 GPT-SoVITS 服务的启动端口和绑定地址,您需要在启动命令中指定 --port--host 参数。

修改方法如下:

  1. 在命令行中启动时:
    如果您是通过命令行启动 GPT-SoVITS 的,请将启动命令修改为:

    python api.py --port 9880 --host 127.0.0.1

    这样服务就会绑定到 127.0.0.1:9880

  2. 在 pyVideoTrans 中配置:
    如果您是在 pyVideoTrans 中使用 GPT-SoVITS,需要在软件内进行配置:

    • 在 pyVideoTrans 主界面,进入 菜单栏 -> 工具 -> 设置
    • 在设置窗口中找到 GPT-SoVITS 相关部分。
    • API地址 修改为 http://127.0.0.1:9880
    • 注意:您需要先在外部(例如命令行)按照上述第1点的方法,使用新端口 9880 启动 GPT-SoVITS 服务,pyVideoTrans 才能成功连接。

关键点说明:

  • --host 127.0.0.1 表示服务只允许本机访问,比 0.0.0.0 更安全。
  • --port 9880 指定了新的服务端口。
  • 修改后,您在浏览器或 pyVideoTrans 中访问的地址都应变为 http://127.0.0.1:9880
Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions