Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is there no sound sometimes when using the 5_HP-Karaoke-UVR.pth model? #98

Closed
Lixi20 opened this issue Aug 15, 2024 · 4 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed specific-model-not-working

Comments

@Lixi20
Copy link
Contributor

Lixi20 commented Aug 15, 2024

I found that it may be related to the parameters, please help me

from pathlib import Path

from audio_separator.separator import Separator

def main():
    input_audio = "/home/geek/workspace/TestSample/Tom_Holland.wav"
    output_dir = "/home/geek/workspace/TestSample/"
    model_file_dir = "/home/geek/.cache/audio-separator-models"
    vocal_separation_model_filename = "UVR-MDX-NET-Voc_FT.onnx"
    de_reverb_model_filename = "5_HP-Karaoke-UVR.pth"
    output_format = "wav"

    vocal_separation_separator = Separator(
        model_file_dir=model_file_dir,
        output_format=output_format,
        output_dir=output_dir,
        output_single_stem="Vocals",
        sample_rate=44100,
        mdx_params={"hop_length": 1024, "segment_size": 256, "overlap": 0.25, "batch_size": 16, "enable_denoise": False},
        vr_params={"batch_size": 16, "window_size": 320, "aggression": 10, "enable_tta": True,
                   "enable_post_process": False, "post_process_threshold": 0.2, "high_end_process": False},
    )

    vocal_separation_separator.load_model(model_filename=vocal_separation_model_filename)

    vocal_separation_output_file_path = vocal_separation_separator.separate(input_audio)[0]
    print(vocal_separation_output_file_path)

    vocal_separation_separator.load_model(model_filename=de_reverb_model_filename)

    de_reverb_output_file_path = \
    vocal_separation_separator.separate(Path(output_dir) / vocal_separation_output_file_path)[0]
    print(de_reverb_output_file_path)


if __name__ == "__main__":
    main()

When I set the parameters as follows:
mdx_params={"hop_length": 1024, "segment_size": 256, "overlap": 0.25, "batch_size": 16, "enable_denoise": False}, vr_params={"batch_size": 16, "window_size": 320, "aggression": 10, "enable_tta": False, "enable_post_process": False, "post_process_threshold": 0.2, "high_end_process": False},
the de_reverb_output_file_path is no sound:
https://github.com/Lixi20/audio_separator_test/blob/main/TestSample/enable_tta_false/Tom_Holland_(Vocals)UVR-MDX-NET-Voc_FT(Vocals)_5_HP-Karaoke-UVR.wav

And then I set the parameters as follows:
mdx_params={"hop_length": 1024, "segment_size": 256, "overlap": 0.25, "batch_size": 16, "enable_denoise": False}, vr_params={"batch_size": 16, "window_size": 320, "aggression": 10, "enable_tta": True, "enable_post_process": False, "post_process_threshold": 0.2, "high_end_process": False},

the de_reverb_output_file_path has sound:
https://github.com/Lixi20/audio_separator_test/blob/main/TestSample/enable_tta_true/Tom_Holland_(Vocals)UVR-MDX-NET-Voc_FT(Vocals)_5_HP-Karaoke-UVR.wav

I didn't set the enable_tta parameter before, and there was sound, but now it doesn't work. Why is this?

@Lixi20
Copy link
Contributor Author

Lixi20 commented Aug 15, 2024

@beveradb

@beveradb
Copy link
Collaborator

Sorry @Lixi20 but I don't know, I didn't train that model or write the original implementation for the VR architecture!

If you really want to figure it out, you can investigate what the code is doing and try to debug it:

Good luck! If you find a fix, please raise a PR and I'll test & merge it :)

@beveradb beveradb added bug Something isn't working help wanted Extra attention is needed specific-model-not-working labels Aug 16, 2024
@Lixi20
Copy link
Contributor Author

Lixi20 commented Aug 29, 2024

here

here

code

Hope it helps you! !! !!

@beveradb

@beveradb
Copy link
Collaborator

Thank you so much @Lixi20 - this fix is now live in audio-separator version 0.19.2 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed specific-model-not-working
Projects
None yet
Development

No branches or pull requests

2 participants