Update server.py
Browse files
server.py
CHANGED
|
@@ -55,11 +55,12 @@ def execute_commands(port_and_commands_json):
|
|
| 55 |
|
| 56 |
# 构造完整的命令字符串
|
| 57 |
full_command = f'python /home/aistudio/work/GPT-SoVITS/api.py -p {port} {command}'
|
| 58 |
-
|
| 59 |
# 执行命令并将其放入后台
|
| 60 |
print(f'Executing command on port {port}: {full_command}')
|
| 61 |
process = subprocess.Popen(full_command, shell=True) # 使用 Popen 启动进程
|
| 62 |
processes.append(process) # 将进程对象添加到列表
|
|
|
|
| 63 |
|
| 64 |
except json.JSONDecodeError as e:
|
| 65 |
print(f"Failed to decode JSON: {e}")
|
|
@@ -90,8 +91,8 @@ os.chdir('/home/aistudio/work/GPT-SoVITS')
|
|
| 90 |
|
| 91 |
execute_commands(port_and_commands_json)
|
| 92 |
subprocess.run('python /home/aistudio/activate_port.py 7860', shell=True)
|
| 93 |
-
subprocess.run('python /home/aistudio/activate_port.py 7861', shell=True)
|
| 94 |
-
subprocess.run('python /home/aistudio/activate_port.py 7862', shell=True)
|
| 95 |
-
subprocess.run('python /home/aistudio/activate_port.py 7863', shell=True)
|
| 96 |
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"')
|
| 97 |
|
|
|
|
| 55 |
|
| 56 |
# 构造完整的命令字符串
|
| 57 |
full_command = f'python /home/aistudio/work/GPT-SoVITS/api.py -p {port} {command}'
|
| 58 |
+
subprocess.run(f'python /home/aistudio/activate_port.py {port}', shell=True)
|
| 59 |
# 执行命令并将其放入后台
|
| 60 |
print(f'Executing command on port {port}: {full_command}')
|
| 61 |
process = subprocess.Popen(full_command, shell=True) # 使用 Popen 启动进程
|
| 62 |
processes.append(process) # 将进程对象添加到列表
|
| 63 |
+
time.sleep(30)
|
| 64 |
|
| 65 |
except json.JSONDecodeError as e:
|
| 66 |
print(f"Failed to decode JSON: {e}")
|
|
|
|
| 91 |
|
| 92 |
execute_commands(port_and_commands_json)
|
| 93 |
subprocess.run('python /home/aistudio/activate_port.py 7860', shell=True)
|
| 94 |
+
# subprocess.run('python /home/aistudio/activate_port.py 7861', shell=True)
|
| 95 |
+
# subprocess.run('python /home/aistudio/activate_port.py 7862', shell=True)
|
| 96 |
+
# subprocess.run('python /home/aistudio/activate_port.py 7863', shell=True)
|
| 97 |
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"')
|
| 98 |
|