Skip to content

Add mlx-whisper audio backend#64

Open
mxl wants to merge 1 commit into
byjlw:mainfrom
mxl:feat/mlx-whisper-backend
Open

Add mlx-whisper audio backend#64
mxl wants to merge 1 commit into
byjlw:mainfrom
mxl:feat/mlx-whisper-backend

Conversation

@mxl

@mxl mxl commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional mlx-whisper audio transcription backend alongside the existing faster-whisper path
  • make the audio backend configurable through audio.backend
  • document the optional MLX installation path and backend setting

Details

  • add video_analyzer/whisper_backends.py with:
    • FasterWhisperBackend
    • MlxWhisperBackend
    • create_whisper_backend(...)
  • refactor AudioProcessor to use an injected backend while keeping shared extraction/transcript orchestration in one place
  • add audio.backend to the packaged default config with faster-whisper as the default
  • add optional mlx-whisper dependency support:
    • conditional dependency in requirements.txt
    • mlx extra in setup.py
  • update docs to mention:
    • audio.backend
    • pip install \".[mlx]\"

Behavior Notes

  • faster-whisper keeps the current behavior, including beam search and VAD filtering
  • mlx-whisper currently uses:
    • word_timestamps=True
    • temperature=0
    • optional language
  • mlx-whisper does not use beam_size because the current library raises NotImplementedError for beam search
  • mlx-whisper also does not support the same VAD options as faster-whisper

Testing

  • python -m pytest -q tests/test_whisper_backends.py

Notes

  • A full repository-wide pytest run currently fails in the separate video-analyzer-tune subproject because dspy is not installed in this environment

@mxl

mxl commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

It's better to review #63 first.

@byjlw

byjlw commented Apr 19, 2026

Copy link
Copy Markdown
Owner

It's better to review #63 first.

review comments on 63

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.

2 participants