mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 15:19:59 +08:00
clean path
This commit is contained in:
parent
d776ff6bd3
commit
6301b7699c
@ -2,6 +2,7 @@ import os
|
|||||||
import traceback,gradio as gr
|
import traceback,gradio as gr
|
||||||
import logging
|
import logging
|
||||||
from tools.i18n.i18n import I18nAuto
|
from tools.i18n.i18n import I18nAuto
|
||||||
|
from tools.my_utils import clean_path
|
||||||
i18n = I18nAuto()
|
i18n = I18nAuto()
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -26,13 +27,9 @@ is_share=eval(sys.argv[4])
|
|||||||
def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format0):
|
def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format0):
|
||||||
infos = []
|
infos = []
|
||||||
try:
|
try:
|
||||||
inp_root = inp_root.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
|
inp_root = clean_path(inp_root)
|
||||||
save_root_vocal = (
|
save_root_vocal = clean_path(save_root_vocal)
|
||||||
save_root_vocal.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
|
save_root_ins = clean_path(save_root_ins)
|
||||||
)
|
|
||||||
save_root_ins = (
|
|
||||||
save_root_ins.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
|
|
||||||
)
|
|
||||||
is_hp3 = "HP3" in model_name
|
is_hp3 = "HP3" in model_name
|
||||||
if model_name == "onnx_dereverb_By_FoxJoy":
|
if model_name == "onnx_dereverb_By_FoxJoy":
|
||||||
pre_fun = MDXNetDereverb(15)
|
pre_fun = MDXNetDereverb(15)
|
||||||
|
1
webui.py
1
webui.py
@ -199,6 +199,7 @@ def open_asr(asr_inp_dir, asr_opt_dir, asr_model, asr_model_size, asr_lang):
|
|||||||
global p_asr
|
global p_asr
|
||||||
if(p_asr==None):
|
if(p_asr==None):
|
||||||
asr_inp_dir=my_utils.clean_path(asr_inp_dir)
|
asr_inp_dir=my_utils.clean_path(asr_inp_dir)
|
||||||
|
asr_opt_dir=my_utils.clean_path(asr_opt_dir)
|
||||||
cmd = f'"{python_exec}" tools/asr/{asr_dict[asr_model]["path"]}'
|
cmd = f'"{python_exec}" tools/asr/{asr_dict[asr_model]["path"]}'
|
||||||
cmd += f' -i "{asr_inp_dir}"'
|
cmd += f' -i "{asr_inp_dir}"'
|
||||||
cmd += f' -o "{asr_opt_dir}"'
|
cmd += f' -o "{asr_opt_dir}"'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user