mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-07 04:09:06 +08:00
Adopt any directory format
Signed-off-by: Xavier Lau <xavier@inv.cafe>
This commit is contained in:
parent
b0fca77ea0
commit
3cdbd45632
@ -219,18 +219,14 @@ class Predictor:
|
|||||||
opt_path_vocal = path_vocal[:-4] + ".%s" % format
|
opt_path_vocal = path_vocal[:-4] + ".%s" % format
|
||||||
opt_path_other = path_other[:-4] + ".%s" % format
|
opt_path_other = path_other[:-4] + ".%s" % format
|
||||||
if os.path.exists(path_vocal):
|
if os.path.exists(path_vocal):
|
||||||
os.system(
|
os.system(f'ffmpeg -i "{path_vocal}" -vn "{opt_path_vocal}" -q:a 2 -y')
|
||||||
"ffmpeg -i %s -vn %s -q:a 2 -y" % (path_vocal, opt_path_vocal)
|
|
||||||
)
|
|
||||||
if os.path.exists(opt_path_vocal):
|
if os.path.exists(opt_path_vocal):
|
||||||
try:
|
try:
|
||||||
os.remove(path_vocal)
|
os.remove(path_vocal)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if os.path.exists(path_other):
|
if os.path.exists(path_other):
|
||||||
os.system(
|
os.system(f'ffmpeg -i "{path_other}" -vn "{opt_path_other}" -q:a 2 -y')
|
||||||
"ffmpeg -i %s -vn %s -q:a 2 -y" % (path_other, opt_path_other)
|
|
||||||
)
|
|
||||||
if os.path.exists(opt_path_other):
|
if os.path.exists(opt_path_other):
|
||||||
try:
|
try:
|
||||||
os.remove(path_other)
|
os.remove(path_other)
|
||||||
|
@ -65,8 +65,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
|
|||||||
os.path.basename(inp_path),
|
os.path.basename(inp_path),
|
||||||
)
|
)
|
||||||
os.system(
|
os.system(
|
||||||
"ffmpeg -i %s -vn -acodec pcm_s16le -ac 2 -ar 44100 %s -y"
|
f'ffmpeg -i "{inp_path}" -vn -acodec pcm_s16le -ac 2 -ar 44100 "{tmp_path}" -y'
|
||||||
% (inp_path, tmp_path)
|
|
||||||
)
|
)
|
||||||
inp_path = tmp_path
|
inp_path = tmp_path
|
||||||
try:
|
try:
|
||||||
|
@ -146,7 +146,7 @@ class AudioPre:
|
|||||||
)
|
)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
opt_format_path = path[:-4] + ".%s" % format
|
opt_format_path = path[:-4] + ".%s" % format
|
||||||
os.system("ffmpeg -i %s -vn %s -q:a 2 -y" % (path, opt_format_path))
|
os.system(f'ffmpeg -i "{path}" -vn "{opt_format_path}" -q:a 2 -y')
|
||||||
if os.path.exists(opt_format_path):
|
if os.path.exists(opt_format_path):
|
||||||
try:
|
try:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
@ -187,7 +187,7 @@ class AudioPre:
|
|||||||
)
|
)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
opt_format_path = path[:-4] + ".%s" % format
|
opt_format_path = path[:-4] + ".%s" % format
|
||||||
os.system("ffmpeg -i %s -vn %s -q:a 2 -y" % (path, opt_format_path))
|
os.system(f'ffmpeg -i "{path}" -vn "{opt_format_path}" -q:a 2 -y')
|
||||||
if os.path.exists(opt_format_path):
|
if os.path.exists(opt_format_path):
|
||||||
try:
|
try:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
@ -323,7 +323,7 @@ class AudioPreDeEcho:
|
|||||||
)
|
)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
opt_format_path = path[:-4] + ".%s" % format
|
opt_format_path = path[:-4] + ".%s" % format
|
||||||
os.system("ffmpeg -i %s -vn %s -q:a 2 -y" % (path, opt_format_path))
|
os.system(f'ffmpeg -i "{path}" -vn "{opt_format_path}" -q:a 2 -y')
|
||||||
if os.path.exists(opt_format_path):
|
if os.path.exists(opt_format_path):
|
||||||
try:
|
try:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
@ -360,7 +360,7 @@ class AudioPreDeEcho:
|
|||||||
)
|
)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
opt_format_path = path[:-4] + ".%s" % format
|
opt_format_path = path[:-4] + ".%s" % format
|
||||||
os.system("ffmpeg -i %s -vn %s -q:a 2 -y" % (path, opt_format_path))
|
os.system(f'ffmpeg -i "{path}" -vn "{opt_format_path}" -q:a 2 -y')
|
||||||
if os.path.exists(opt_format_path):
|
if os.path.exists(opt_format_path):
|
||||||
try:
|
try:
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user