init
Browse files
app.py
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
|
|
| 1 |
import subprocess
|
|
|
|
| 2 |
|
| 3 |
-
# Run
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
import subprocess
|
| 3 |
+
import sys
|
| 4 |
|
| 5 |
+
# Run shell command and capture output in real-time
|
| 6 |
+
def init():
|
| 7 |
+
process = subprocess.Popen("""
|
| 8 |
+
bash run.sh
|
| 9 |
+
""", stdout=subprocess.PIPE, shell=True)
|
| 10 |
+
while True:
|
| 11 |
+
output = process.stdout.readline().decode()
|
| 12 |
+
if output == '' and process.poll() is not None:
|
| 13 |
+
break
|
| 14 |
+
if output:
|
| 15 |
+
print(output.strip())
|
| 16 |
+
|
| 17 |
+
# Wait for the command to finish and get the return code
|
| 18 |
+
return_code = process.poll()
|
| 19 |
+
print(f"Command exited with return code {return_code}")
|
| 20 |
+
|
| 21 |
+
init()
|
| 22 |
+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "SuTTS/test")))
|
| 23 |
+
# sys.path.append("/Users/peng/PROGRAM/GitHub/SuTTS/test")
|
| 24 |
+
|
| 25 |
+
print(sys.path)
|
| 26 |
+
|
| 27 |
+
from sovits_gradio import VitsGradio
|
| 28 |
+
grVits = VitsGradio()
|
| 29 |
+
grVits.Vits.launch(debug=True)
|
run.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
if [ -d "SuTTS" ]; then
|
| 3 |
+
echo "SuTTS already exists"
|
| 4 |
+
cd SuTTS
|
| 5 |
+
git pull --recurse-submodules
|
| 6 |
+
git submodule update --recursive
|
| 7 |
+
git submodule sync
|
| 8 |
+
else
|
| 9 |
+
git clone https://github.com/SuCicada/SuTTS.git
|
| 10 |
+
cd SuTTS
|
| 11 |
+
fi
|
| 12 |
+
|
| 13 |
+
make install_requirements
|
| 14 |
+
make download-model-so_vits_svc
|