1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-09 04:29:50 +08:00

Adopt any directory format (#2052)

Signed-off-by: Xavier Lau <xavier@inv.cafe>
This commit is contained in:
Xavier Lau
2024-05-15 13:10:48 +08:00
committed by GitHub
parent b0fca77ea0
commit 6c6d62df59
3 changed files with 7 additions and 12 deletions

View File

@@ -219,18 +219,14 @@ class Predictor:
opt_path_vocal = path_vocal[:-4] + ".%s" % format
opt_path_other = path_other[:-4] + ".%s" % format
if os.path.exists(path_vocal):
os.system(
"ffmpeg -i %s -vn %s -q:a 2 -y" % (path_vocal, opt_path_vocal)
)
os.system(f'ffmpeg -i "{path_vocal}" -vn "{opt_path_vocal}" -q:a 2 -y')
if os.path.exists(opt_path_vocal):
try:
os.remove(path_vocal)
except:
pass
if os.path.exists(path_other):
os.system(
"ffmpeg -i %s -vn %s -q:a 2 -y" % (path_other, opt_path_other)
)
os.system(f'ffmpeg -i "{path_other}" -vn "{opt_path_other}" -q:a 2 -y')
if os.path.exists(opt_path_other):
try:
os.remove(path_other)