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

Turn off source splitting #32

Closed
corneliusgerico opened this issue Apr 28, 2023 · 3 comments
Closed

Turn off source splitting #32

corneliusgerico opened this issue Apr 28, 2023 · 3 comments

Comments

@corneliusgerico
Copy link

Hi,

What is the simplest way to do this?

Thanks

@MahmoudAshraf97
Copy link
Owner

pass --no-stem in the cli arguments

@Oheed911
Copy link

can we do it from the python usage?

@MahmoudAshraf97
Copy link
Owner

can we do it from the python usage?

Yes, remove the following code

if args.stemming:
# Isolate vocals from the rest of the audio
return_code = os.system(
f'python3 -m demucs.separate -n htdemucs_ft --two-stems=vocals "{args.audio}" -o "temp_outputs"'
)
if return_code != 0:
print(
"Source splitting failed, using original audio file. Use --no-stem argument to disable it."
)
vocal_target = args.audio
else:
vocal_target = f"temp_outputs/htdemucs_ft/{args.audio[:-4]}/vocals.wav"
else:
vocal_target = args.audio

and replace it with
vocal_target = args.audio or whatever your file name argument is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants