a misspelled flag is dropped without a word. --bakend cuda runs on cpu and exits 0, so you believe you got a cuda run and nothing says otherwise.
built at a76ec04 on macos arm64, cmake -DAUDIOCPP_MODEL_SET=custom -DAUDIOCPP_MODELS=citrinet_asr
audiocpp_cli --list-loaders --bakend cuda
# registered_loaders=3
# citrinet_asr: asr (offline)
# marblenet_vad: vad (offline)
# silero_vad: vad (offline|streaming)
# exit 0, no warning
audiocpp_cli --list-loaders --this-flag-does-not-exist
# same output, exit 0
audiocpp_cli --task asr --family citrinet_asr --model <path> --sesion-option a=b
# the session option is silently dropped
a wrong value is caught, --backend notreal fails with unsupported backend: notreal. it is only the option name that goes unchecked.
cause is in app/cli/args.cpp: find_arg, has_arg and collect_args each scan argv for the one name they expect, and nothing ever looks at what is left over, so an unmatched token just disappears.
the other binary in this repo already does the opposite. app/model_manager/main.cpp:61 walks its arguments and throws unknown option: on anything it does not recognise, so the two CLIs disagree on this today.
happy to send the patch, one question first. do you want a warning on stderr that leaves the exit code and stdout alone, or a hard error? a hard error is stricter but would break any script that passes a stray flag today, so i have a warning working locally and can switch it either way.
a misspelled flag is dropped without a word.
--bakend cudaruns on cpu and exits 0, so you believe you got a cuda run and nothing says otherwise.built at
a76ec04on macos arm64,cmake -DAUDIOCPP_MODEL_SET=custom -DAUDIOCPP_MODELS=citrinet_asra wrong value is caught,
--backend notrealfails withunsupported backend: notreal. it is only the option name that goes unchecked.cause is in
app/cli/args.cpp:find_arg,has_argandcollect_argseach scan argv for the one name they expect, and nothing ever looks at what is left over, so an unmatched token just disappears.the other binary in this repo already does the opposite.
app/model_manager/main.cpp:61walks its arguments and throwsunknown option:on anything it does not recognise, so the two CLIs disagree on this today.happy to send the patch, one question first. do you want a warning on stderr that leaves the exit code and stdout alone, or a hard error? a hard error is stricter but would break any script that passes a stray flag today, so i have a warning working locally and can switch it either way.