SuCicada commited on
Commit
4b156f1
1 Parent(s): 9addb41
Files changed (5) hide show
  1. .gitignore +1 -0
  2. app.py +34 -0
  3. packages.txt +1 -0
  4. requirements.txt +4 -0
  5. run.sh +14 -0
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .idea
app.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import sys
4
+
5
+
6
+ # Run shell command and capture output in real-time
7
+ def init():
8
+ process = subprocess.Popen("""
9
+ bash run.sh
10
+ """, stdout=subprocess.PIPE, shell=True)
11
+ while True:
12
+ output = process.stdout.readline().decode()
13
+ if output == '' and process.poll() is not None:
14
+ break
15
+ if output:
16
+ print(output.strip())
17
+
18
+ # Wait for the command to finish and get the return code
19
+ return_code = process.poll()
20
+ print(f"Command exited with return code {return_code}")
21
+
22
+
23
+ is_space = os.getenv("SYSTEM") == "spaces"
24
+ if is_space:
25
+ init()
26
+
27
+ if is_space:
28
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "SuTTS/test")))
29
+ else:
30
+ sys.path.append("/Users/peng/PROGRAM/GitHub/SuTTS/test")
31
+
32
+ print(sys.path)
33
+ os.environ['USE_CACHE_INFERENCE_AUDIO'] = "True"
34
+
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ make
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ torch
2
+ torchvision
3
+ torchaudio
4
+
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/Plachtaa/VITS-fast-fine-tuning.git --recurse-submodules
10
+ pip install -r requirements.txt
11
+ cd SuTTS
12
+ fi
13
+
14
+ python VC_inference.py --model_dir ../G_latest.pth --config_dir ../finetune_speaker.json