mirror of
https://github.com/Anjok07/ultimatevocalremovergui.git
synced 2025-02-16 10:52:33 +01:00
Update ensemble_inference.py
This commit is contained in:
parent
01ff87da7b
commit
f2d673077a
@ -112,8 +112,9 @@ def main():
|
|||||||
|
|
||||||
args = p.parse_args()
|
args = p.parse_args()
|
||||||
|
|
||||||
basename = os.path.splitext(os.path.basename(args.input))[0]
|
|
||||||
ensembled_dir = os.path.join("ensembled", "temp")
|
ensembled_dir = os.path.join("ensembled", "temp")
|
||||||
|
basename = os.path.splitext(os.path.basename(args.input))[0]
|
||||||
|
basenameb = '{}'.format(os.path.splitext(os.path.basename(args.input))[0])
|
||||||
|
|
||||||
#CLEAR-TEMP-FOLDER
|
#CLEAR-TEMP-FOLDER
|
||||||
for file in os.scandir(ensembled_dir):
|
for file in os.scandir(ensembled_dir):
|
||||||
@ -208,11 +209,22 @@ def main():
|
|||||||
|
|
||||||
for i,e in tqdm(enumerate(ensambles), desc="Ensembling..."):
|
for i,e in tqdm(enumerate(ensambles), desc="Ensembling..."):
|
||||||
os.system("python " + os.path.join("lib", "spec_utils.py") + f" -a {e['algorithm']} -m {e['model_params']} {' '.join(e['files'])} -o {e['output']}")
|
os.system("python " + os.path.join("lib", "spec_utils.py") + f" -a {e['algorithm']} -m {e['model_params']} {' '.join(e['files'])} -o {e['output']}")
|
||||||
|
|
||||||
'''
|
if args.savein:
|
||||||
|
for pm in args.pretrained_models:
|
||||||
|
os.rename(
|
||||||
|
os.path.join(ensembled_dir, f"{basename}_{pm}_Instruments.wav"),
|
||||||
|
os.path.join('separated', f"{basename}_{pm}_Instruments.wav")
|
||||||
|
)
|
||||||
|
|
||||||
|
os.rename(
|
||||||
|
os.path.join(ensembled_dir, f"{basename}_{pm}_Vocals.wav"),
|
||||||
|
os.path.join('separated', f"{basename}_{pm}_Vocals.wav")
|
||||||
|
)
|
||||||
|
|
||||||
if args.deepextraction:
|
if args.deepextraction:
|
||||||
def get_files(folder="", files=""):
|
#def get_files(folder="", files=""):
|
||||||
return [f"{folder}{i}" for i in os.listdir(folder) if i.endswith(suffix)]
|
# return [os.path.join(folder, i) for i in os.listdir(folder) if i.endswith(suffix)]
|
||||||
|
|
||||||
deepext = [
|
deepext = [
|
||||||
{
|
{
|
||||||
@ -226,7 +238,6 @@ def main():
|
|||||||
|
|
||||||
for i,e in tqdm(enumerate(deepext), desc="Performing Deep Extraction..."):
|
for i,e in tqdm(enumerate(deepext), desc="Performing Deep Extraction..."):
|
||||||
os.system(f"python lib/spec_utils.py -a {e['algorithm']} -m {e['model_params']} {e['file1']} {e['file2']} -o {e['output']}")
|
os.system(f"python lib/spec_utils.py -a {e['algorithm']} -m {e['model_params']} {e['file1']} {e['file2']} -o {e['output']}")
|
||||||
'''
|
|
||||||
|
|
||||||
for file in os.scandir(ensembled_dir):
|
for file in os.scandir(ensembled_dir):
|
||||||
os.remove(file.path)
|
os.remove(file.path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user