Open ybwai opened 8 months ago
I'll make it!
doing something like this returns me two files that are the same as the input, what am I getting wrong?
from rvc.modules.uvr5.vr import AudioPreprocess
def separate():
input_path = f"{project_dir}/sandbox/inputs/input.mp3"
output_path = Path(f"{project_dir}/sandbox/outputs/")
model_name = "HP5_only_main_vocal.pth"
model_path = os.path.join(os.getenv("weight_uvr5_root"), model_name)
agg = 10
pre_fun = AudioPreprocess(model_path, agg)
result = pre_fun.process(input_path)
wav_instrument, wav_vocals, sr, agg = result
sf.write(f"{output_path}/instrumental.wav", wav_instrument / 32768, sr)
sf.write(f"{output_path}/vocals.wav", wav_vocals / 32768, sr)
The cli and api endpoint seem to make use of a wrapper:
uvr_module.uvr_wrapper(
inputpath, outputpath, model_name=modelname, export_format=format
)
But not sure this actually works, as the wrapper does not accept an output_path, it returns the files.
Have also tried to use the wrapper directly:
```
uvr = UVR()
results = uvr.uvr_wrapper(input_path, agg=10, model_name="HP3_all_vocals.pth")
for i, result in enumerate(results):
wav_instrument, wav_vocals, sr, agg = result
sf.write(f"{output_path}/instrument_{i}.wav", wav_instrument / 32768, sr)
sf.write(f"{output_path}/vocals_{i}.wav", wav_vocals / 32768, sr)
but sadly I still get the same issue of the instrumental and vocals files being the same (original audio). Any help @Tps-F ?
I will check, It could be a bug.
Is this available in this version of the project yet? if so any examples, trying to migrate from the old repo where it was working.
thanks,