-
Notifications
You must be signed in to change notification settings - Fork 922
/
svc_preprocessing.py
34 lines (27 loc) · 1.26 KB
/
svc_preprocessing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import os
import torch
import argparse
import subprocess
assert torch.cuda.is_available(), "\033[31m You need GPU to Train! \033[0m"
print("CPU Count is :", os.cpu_count())
parser = argparse.ArgumentParser()
parser.add_argument("-t", type=int, default=0, help="thread count")
args = parser.parse_args()
commands = [
"python prepare/preprocess_a.py -w ./dataset_raw -o ./data_svc/waves-16k -s 16000 -t 0",
"python prepare/preprocess_a.py -w ./dataset_raw -o ./data_svc/waves-32k -s 32000 -t 0",
"python prepare/preprocess_crepe.py -w data_svc/waves-16k/ -p data_svc/pitch",
"python prepare/preprocess_ppg.py -w data_svc/waves-16k/ -p data_svc/whisper",
"python prepare/preprocess_hubert.py -w data_svc/waves-16k/ -v data_svc/hubert",
"python prepare/preprocess_speaker.py data_svc/waves-16k/ data_svc/speaker -t 0",
"python prepare/preprocess_speaker_ave.py data_svc/speaker/ data_svc/singer",
"python prepare/preprocess_spec.py -w data_svc/waves-32k/ -s data_svc/specs -t 0",
"python prepare/preprocess_train.py",
"python prepare/preprocess_zzz.py",
]
for command in commands:
print(f"Command: {command}")
process = subprocess.Popen(command, shell=True)
outcode = process.wait()
if (outcode):
break