chore(sync): merge dev into main (#1399)

* Update mdxnet.py

* Update modules.py

* Rename preprocess.py to vr.py

* Add files via upload

* deps: add av lib (#1391)

* Add files via upload

* chore(format): run black on dev (#1398)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: RVC-Boss <129054828+RVC-Boss@users.noreply.github.com>
Co-authored-by: Hiroto N <hironow365@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-10-08 18:54:58 +08:00
committed by GitHub
parent 1fdbb94811
commit 1696c5356b
5 changed files with 76 additions and 35 deletions

View File

@@ -216,16 +216,26 @@ class Predictor:
path_other = "%s/%s_others.wav" % (others_root, basename)
sf.write(path_vocal, mix - opt, rate)
sf.write(path_other, opt, rate)
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, path_vocal[:-4] + ".%s" % format)
"ffmpeg -i %s -vn %s -q:a 2 -y" % (path_vocal, opt_path_vocal)
)
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, path_other[:-4] + ".%s" % format)
"ffmpeg -i %s -vn %s -q:a 2 -y" % (path_other, opt_path_other)
)
if os.path.exists(opt_path_other):
try:
os.remove(path_other)
except:
pass
class MDXNetDereverb:
@@ -242,5 +252,5 @@ class MDXNetDereverb:
self.pred = Predictor(self)
self.device = device
def path_audio(self, input, vocal_root, others_root, format):
def _path_audio_(self, input, vocal_root, others_root, format, is_hp3=False):
self.pred.prediction(input, vocal_root, others_root, format)