Skip to content

Fix Whisper output names containing dots - #1457

Open
akshitkhokhani wants to merge 1 commit into
ml-explore:mainfrom
akshitkhokhani:codex/fix-whisper-dotted-output
Open

akshitkhokhani wants to merge 1 commit into
ml-explore:mainfrom
akshitkhokhani:codex/fix-whisper-dotted-output

Conversation

@akshitkhokhani

Copy link
Copy Markdown

mlx_whisper meeting.part1.wav currently writes meeting.txt: the CLI removes the audio extension, then the writer removes .part1 as another suffix. A separate invocation for meeting.part2.wav overwrites that transcript. Explicit --output-name draft.v2 similarly becomes draft.txt, despite the option describing a name before the output-format extension.

Append the format extension to the complete output name. Regression tests use real writers/files for TXT, VTT, SRT, TSV, JSON and all, plus separate single-input CLI invocations with only transcription mocked. They cover dotted audio basenames, an explicit dotted name, and unchanged plain names.

Validation:

  • Original writer: 8 failing subtests; patched writer: both test methods and all subtests pass.
  • Existing TestAudio: 3 tests pass on CPU using bundled audio.
  • Repository Black/isort pre-commit hooks pass on both changed files; git diff --check passes.
  • Model-dependent transcription tests were not run; no models were downloaded.

The separate multi-input CLI naming issue is tracked by #1441 / #1447. These tests use separate invocations to isolate the writer bug.

AI-assisted source investigation, implementation and tests; a separate AI reviewer checked the change. Human maintainer review is still required.

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.

1 participant