[GH-ISSUE #23] Any docs/examples on how to do the audio separation with HP5_only_main_vocal and DeEcho #20

Open
opened 2026-10-20 09:53:10 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @ghost on GitHub (Mar 20, 2024).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/issues/23

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,

Originally created by @ghost on GitHub (Mar 20, 2024). Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/issues/23 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,
Author
Owner

@Tps-F commented on GitHub (Mar 22, 2024):

I'll make it!

<!-- gh-comment-id:2014353857 --> @Tps-F commented on GitHub (Mar 22, 2024): I'll make it!
Author
Owner

@ghost commented on GitHub (Apr 2, 2024):

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)


<!-- gh-comment-id:2031843213 --> @ghost commented on GitHub (Apr 2, 2024): 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) ```
Author
Owner

@ghost commented on GitHub (Apr 9, 2024):

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 ?

<!-- gh-comment-id:2045632875 --> @ghost commented on GitHub (Apr 9, 2024): 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 ?
Author
Owner

@Tps-F commented on GitHub (Apr 9, 2024):

I will check, It could be a bug.

<!-- gh-comment-id:2045649905 --> @Tps-F commented on GitHub (Apr 9, 2024): I will check, It could be a bug.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RVC-Project/Retrieval-based-Voice-Conversion#20
No description provided.