Skip to content

[BUG]: Fix bug in extract_stems.py in drumscript/__init__.py (see below) #266

Description

@bellescoincidences

extract_stems()Bug — always returns drum_path, never results["mix"]

The bug is in extract_stems() in init.py (the public API wrapper).

drum_path = results.get("drums") or results.get("drums_stem")
if full:
    return {
        "status": "success",
        "drum_stem_path": drum_path,
        "original_file": audio_path,
        "output_directory": str(output_dir),
    }
return drum_path

It always returns the drum path, even when drumless=True. The separate_audio() function correctly creates the backing track and stores it in results["mix"], but extract_stems() ignores it and only ever returns the drums path.

Need to fix drumscript/__init__.py, replace return block in extract_stems() with:

drum_path = results.get("drums") or results.get("drums_stem")

if full:
    return {
        "status": "success",
        "drum_stem_path": drum_path,
        "mix_path": results.get("mix"),          # <== ADD THIS
        "original_file": audio_path,
        "output_directory": str(output_dir),
    }

# If drumless was requested, return the backing track, not the drums
if drumless and results.get("mix"):           # <== ADD THIS
    return results["mix"]                      # <== ADD THIS

return drum_path

Activity

  1. changed the title [-][POST-RELEASE]: Fix bug in extract_stems.py in drumscript/__init__.py (see below)[/-] [+][BUG]: Fix bug in extract_stems.py in drumscript/__init__.py (see below)[/+] on May 22, 2026
  2. linked a pull request that will close this issuerelease/0.2.0 #286on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions