Command-line interface¶
Inference¶
asteroid-infer¶
Example¶
asteroid-infer "mpariente/ConvTasNet_WHAM!_sepclean" --files myaudio.wav --resample --ola-window 8000 --ola-hop 4000
Reference¶
usage: asteroid-infer [-h] --files FILES [FILES ...] [-f] [-r] [-w OLA_WINDOW]
[--ola-hop OLA_HOP] [--ola-window-type OLA_WINDOW_TYPE]
[--ola-no-reorder] [-o OUTPUT_DIR] [-d DEVICE]
url_or_path
positional arguments:
url_or_path Path to the pretrained model.
optional arguments:
-h, --help show this help message and exit
--files FILES [FILES ...]
Path to the wav files to separate. Also supports list
of filenames, directory names and globs.
-f, --force-overwrite
Whether to overwrite output wav files.
-r, --resample Whether to resample wrong sample rate input files.
-w OLA_WINDOW, --ola-window OLA_WINDOW
Overlap-add window to use. If not set (default),
overlap-add is not used.
--ola-hop OLA_HOP Overlap-add hop length in samples. Defaults to ola-
window // 2. Only used if --ola-window is set.
--ola-window-type OLA_WINDOW_TYPE
Type of overlap-add window to use. Only used if --ola-
window is set.
--ola-no-reorder Disable automatic reordering of overlap-add chunk. See
asteroid.dsp.LambdaOverlapAdd for details. Only used
if --ola-window is set.
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
Output directory to save files.
-d DEVICE, --device DEVICE
Device to run the model on, eg. 'cuda:0'.Defaults to
'cuda' if CUDA is available, else 'cpu'.
Publishing models¶
asteroid-upload¶
Reference¶
usage: asteroid-upload [-h] [--uploader UPLOADER] [--affiliation AFFILIATION]
[--git_username GIT_USERNAME] [--token TOKEN]
[--force_publish] [--use_sandbox]
publish_dir
positional arguments:
publish_dir Path to the publish dir.
optional arguments:
-h, --help show this help message and exit
--uploader UPLOADER Name of the uploader. Ex: `Manuel Pariente`
--affiliation AFFILIATION
Affiliation of the uploader. Ex `INRIA`
--git_username GIT_USERNAME
Username in GitHub
--token TOKEN Access token for Zenodo (or sandbox)
--force_publish Whether to without asking confirmation
--use_sandbox Whether to use Zenodo sandbox.
asteroid-register-sr¶
Reference¶
usage: asteroid-register-sr [-h] filename sample_rate
positional arguments:
filename Model file to edit.
sample_rate Sampling rate to add to the model.
optional arguments:
-h, --help show this help message and exit