MontrealCorpusTools / Montreal-Forced-Aligner

Command line utility for forced alignment using Kaldi
https://montrealcorpustools.github.io/Montreal-Forced-Aligner/
MIT License
1.35k stars 249 forks source link

[BUG] MFA 3.0.2: `--beam` and `--retry_beam` are not correctly parsed from command line #777

Closed akshetpandey closed 8 months ago

akshetpandey commented 8 months ago

Debugging checklist

Describe the issue When running the CLI, passing in --beam and --retry-beam are not parsed as valid options and are instead passed as arguments.

> mfa align_one --beam=400 --retry_beam=1000 -t /mfa_data -j 4 --clean --use_threading --use_postgres --single_speaker /mfa_data/my_corpus/recordedNames.wav /mfa_data/my_corpus/recordedNames.txt english_mfa english_mfa /mfa_data/my_corpus_aligned/recordedNames.TextGrid

 Usage: mfa align_one [OPTIONS] SOUND_FILE_PATH TEXT_FILE_PATH DICTIONARY_PATH ACOUSTIC_MODEL_PATH OUTPUT_PATH

╭─ Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Invalid value for 'SOUND_FILE_PATH': File '--beam=400' does not exist.                                                                                                                                             │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Desktop (please complete the following information):

akshetpandey commented 8 months ago

Ahh this is only an issue if the flags are the the beginning. Moving the flags to after the positional arguments fixed it.