mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 23:48:48 +08:00
more chores
This commit is contained in:
parent
494c03107f
commit
990e9f43f9
@ -12,6 +12,7 @@ opt_dir = os.environ.get("opt_dir")
|
|||||||
bert_pretrained_dir = os.environ.get("bert_pretrained_dir")
|
bert_pretrained_dir = os.environ.get("bert_pretrained_dir")
|
||||||
import torch
|
import torch
|
||||||
is_half = eval(os.environ.get("is_half", "True")) and torch.cuda.is_available()
|
is_half = eval(os.environ.get("is_half", "True")) and torch.cuda.is_available()
|
||||||
|
version = os.environ.get('version', None)
|
||||||
import sys, numpy as np, traceback, pdb
|
import sys, numpy as np, traceback, pdb
|
||||||
import os.path
|
import os.path
|
||||||
from glob import glob
|
from glob import glob
|
||||||
@ -84,7 +85,7 @@ if os.path.exists(txt_path) == False:
|
|||||||
name = os.path.basename(name)
|
name = os.path.basename(name)
|
||||||
print(name)
|
print(name)
|
||||||
phones, word2ph, norm_text = clean_text(
|
phones, word2ph, norm_text = clean_text(
|
||||||
text.replace("%", "-").replace("¥", ","), lan
|
text.replace("%", "-").replace("¥", ","), lan, version
|
||||||
)
|
)
|
||||||
path_bert = "%s/%s.pt" % (bert_dir, name)
|
path_bert = "%s/%s.pt" % (bert_dir, name)
|
||||||
if os.path.exists(path_bert) == False and lan == "zh":
|
if os.path.exists(path_bert) == False and lan == "zh":
|
||||||
|
3
webui.py
3
webui.py
@ -62,7 +62,8 @@ else:
|
|||||||
from scipy.io import wavfile
|
from scipy.io import wavfile
|
||||||
from tools.my_utils import load_audio
|
from tools.my_utils import load_audio
|
||||||
from multiprocessing import cpu_count
|
from multiprocessing import cpu_count
|
||||||
|
from text.g2pw import G2PWPinyin
|
||||||
|
g2pw = G2PWPinyin(model_dir="GPT_SoVITS/text/G2PWModel",model_source="GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large",v_to_u=False, neutral_tone_with_five=True)
|
||||||
# os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' # 当遇到mps不支持的步骤时使用cpu
|
# os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1' # 当遇到mps不支持的步骤时使用cpu
|
||||||
|
|
||||||
n_cpu=cpu_count()
|
n_cpu=cpu_count()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user