drumscript.audio_processor.stem_splitter.separate_audio¶
- separate_audio(audio_path: str, output_format: str = 'wav', drumless: bool = False, mute: list = None, all_stems: bool = False, output_dir: str = None) dict[source]¶
Separates a full audio track using Demucs and processes the outputs based on user-input args (optional)
Args: :param audio_path: Path to the source audio. :type audio_path: str :param output_format: ‘wav’ or ‘mp3’, defaults to ‘wav’. :type output_format: str, optional :param drumless: If True, generates a track with everything EXCEPT drums, but also saves the drum only output :type drumless: bool, optional :param mute: List of stems to exclude (e.g., [‘bass’]). :type mute: list, optional :param all_stems: If True, saves all individual raw stems. :type all_stems: bool, optional :param output_dir: Destination folder. Defaults to CWD/separated_stems, unless specified by user :type output_dir: str, optional :return: Dictionary of paths to generated files (e.g.,
{'drums': path, 'mix': path}). :rtype: dict