Skip to content

[whisper] Preserve per-file output names in the CLI - #1447

Open
saichowdary007 wants to merge 1 commit into
ml-explore:mainfrom
saichowdary007:fix/whisper-multi-output
Open

[whisper] Preserve per-file output names in the CLI#1447
saichowdary007 wants to merge 1 commit into
ml-explore:mainfrom
saichowdary007:fix/whisper-multi-output

Conversation

@saichowdary007

Copy link
Copy Markdown

Summary

Fixes #1441.

When the mlx_whisper CLI receives multiple audio paths without
--output-name, derive the output basename independently for each input. The
previous loop mutated output_name after the first file, so every later
transcription overwrote the first output. Explicit --output-name behavior and
stdin handling are unchanged.

Testing

  • PYTHONPATH=. .venv/bin/python -m unittest test_cli -v
  • .venv/bin/pre-commit run --files whisper/mlx_whisper/cli.py whisper/test_cli.py

The regression test mocks transcription and verifies that two input paths are
written as first.txt and second.txt.

Implementation and test preparation used AI assistance; the submitting
contributor reviewed the changed lines and owns the behavior validation.

Fixes ml-explore#1441

Signed-off-by: sai <saikumar@sais-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[whisper] mlx_whisper CLI overwrites output file when multiple audio inputs are provided

1 participant