Repository navigation
fix: reject native CLI keywords that swallow the audio filename - #180
Merged
LauraGPT merged 1 commit intoNov 20, 2026
Merged
Conversation
When the audio list is empty, the CLI rejects any keyword containing a path separator or ending in a recognized audio suffix, ignoring case for the suffix check. The usage error appears before any download and explains how to disambiguate the filename. Explicit audio files are now decoded before runtime validation. New tests cover rejection without a download, local file selection, and the pinned sample fallback. Fixes QwenAudio#175
Contributor
Author
|
@LauraGPT thanks for taking this one. The CLI now stops with a usage error when the keywords flag swallows the audio filename, instead of quietly downloading the sample. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Placing a local recording after
--keywordscan make the CLI download the default English sample and ignore the supplied recording.--keywordsusesnargs="*", so argparse can consume both the keywords and the trailing filename. The resulting empty audio list triggers the sample download.When the audio list is empty, the CLI rejects any keyword containing a path separator or ending in a recognized audio suffix, ignoring case for the suffix check. The usage error appears before any download and explains how to disambiguate the filename. Explicit audio files are now decoded before runtime validation. New tests cover rejection without a download, local file selection, and the pinned sample fallback.
Fixes #175
User impact
Who benefits from this change, and what Fun-ASR workflow improves?
Model and runtime impact
Validation
pytest -q tests/test_transformers_quickstart.pystopped during collection because NumPy was missing, so no tests ran. Ranpython3 -m pytest -q tests/test_transformers_quickstart.pyin a Linux container (python:3.12) for the Fun-ASR load_audio change; 27 tests passed. A run with the Fun-ASR load_audio change reverted gave no clear result, so no test is shown to catch this bug.Screenshots, logs, or transcripts
No user-visible surface changes in this PR, so there is nothing to show.
Notes for reviewers
Nothing beyond what is described above.