Qi28 commited on
Commit
a3a7f88
·
verified ·
1 Parent(s): 0c87c7b

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +6 -6
server.py CHANGED
@@ -5,7 +5,8 @@ import sys
5
  import json
6
  import threading
7
  import time
8
-
 
9
 
10
 
11
  port_and_commands_json = json.dumps([
@@ -83,11 +84,7 @@ subprocess.run(['wget','-O','/home/aistudio/work/GPT-SoVITS/api.py', 'https://hf
83
  os.chdir('/home/aistudio/work/GPT-SoVITS')
84
 
85
 
86
- import subprocess
87
- import psutil
88
- import os
89
- import time
90
- import socket
91
 
92
  def is_port_open(port):
93
  """检查指定端口是否开放。"""
@@ -142,6 +139,9 @@ execute_commands(port_and_commands_json)
142
  env = os.environ.copy()
143
  subprocess.run(['python', '/home/aistudio/activate_port.py', str(7860)], env=env, capture_output=True, text=True)
144
  subprocess.run(['python', '/home/aistudio/activate_port.py', str(7861)], env=env, capture_output=True, text=True)
 
 
 
145
  os.system('python /home/aistudio/work/GPT-SoVITS/api.py -s "/home/aistudio/work/tts1/奶油_e8_s152.pth" -g "/home/aistudio/work/tts1/奶油-e15.ckpt" -dr "/home/aistudio/work/tts1/涨粉.wav" -dt "有个十万播放的切片涨了四千涨了四五千的粉" -dl "zh" -p "7860"')
146
 
147
 
 
5
  import json
6
  import threading
7
  import time
8
+ import psutil
9
+ import socket
10
 
11
 
12
  port_and_commands_json = json.dumps([
 
84
  os.chdir('/home/aistudio/work/GPT-SoVITS')
85
 
86
 
87
+
 
 
 
 
88
 
89
  def is_port_open(port):
90
  """检查指定端口是否开放。"""
 
139
  env = os.environ.copy()
140
  subprocess.run(['python', '/home/aistudio/activate_port.py', str(7860)], env=env, capture_output=True, text=True)
141
  subprocess.run(['python', '/home/aistudio/activate_port.py', str(7861)], env=env, capture_output=True, text=True)
142
+ subprocess.run(['python', '/home/aistudio/activate_port.py', str(7862)], env=env, capture_output=True, text=True)
143
+ subprocess.run(['python', '/home/aistudio/activate_port.py', str(7863)], env=env, capture_output=True, text=True)
144
+
145
  os.system('python /home/aistudio/work/GPT-SoVITS/api.py -s "/home/aistudio/work/tts1/奶油_e8_s152.pth" -g "/home/aistudio/work/tts1/奶油-e15.ckpt" -dr "/home/aistudio/work/tts1/涨粉.wav" -dt "有个十万播放的切片涨了四千涨了四五千的粉" -dl "zh" -p "7860"')
146
 
147