Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
beveradb committed Mar 15, 2024
1 parent ff2e739 commit eba10ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions audio_separator/utils/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import sys
from importlib import metadata

from audio_separator.separator import Separator


def main():
"""Main entry point for the CLI."""
Expand Down Expand Up @@ -103,9 +101,7 @@ def main():
mdxc_use_model_segment_size_help = "use model default segment size instead of the value from the config file. Example: --mdxc_use_model_segment_size"
mdxc_overlap_help = "amount of overlap between prediction windows, 2-50. higher is better but slower (default: %(default)s). Example: --mdxc_overlap=8"
mdxc_batch_size_help = "larger consumes more RAM but may process slightly faster (default: %(default)s). Example: --mdxc_batch_size=4"
mdxc_pitch_shift_help = (
"shift audio pitch by a number of semitones while processing. may improve output for deep/high vocals. (default: %(default)s). Example: --mdxc_pitch_shift=2"
)
mdxc_pitch_shift_help = "shift audio pitch by a number of semitones while processing. may improve output for deep/high vocals. (default: %(default)s). Example: --mdxc_pitch_shift=2"

mdxc_params = parser.add_argument_group("MDXC Architecture Parameters")
mdxc_params.add_argument("--mdxc_segment_size", type=int, default=256, help=mdxc_segment_size_help)
Expand All @@ -123,6 +119,8 @@ def main():

logger.setLevel(log_level)

from audio_separator.separator import Separator

if args.env_info:
separator = Separator()
sys.exit(0)
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def common_expected_args():
"mdx_params": {"hop_length": 1024, "segment_size": 256, "overlap": 0.25, "batch_size": 1, "enable_denoise": False},
"vr_params": {"batch_size": 4, "window_size": 512, "aggression": 5, "enable_tta": False, "enable_post_process": False, "post_process_threshold": 0.2, "high_end_process": False},
"demucs_params": {"segment_size": "Default", "shifts": 2, "overlap": 0.25, "segments_enabled": True},
"mdxc_params": {"segment_size": 256, "batch_size": 1, "overlap": 8, "use_model_segment_size": False, "pitch_shift": 0},
}


Expand Down

0 comments on commit eba10ac

Please sign in to comment.