Skip to content

fix(whisperx): use whisperx.diarize.DiarizationPipeline with token kwarg#10389

Merged
mudler merged 1 commit into
mudler:masterfrom
Anai-Guo:fix-whisperx-diarization-pipeline
Jun 18, 2026
Merged

fix(whisperx): use whisperx.diarize.DiarizationPipeline with token kwarg#10389
mudler merged 1 commit into
mudler:masterfrom
Anai-Guo:fix-whisperx-diarization-pipeline

Conversation

@Anai-Guo

Copy link
Copy Markdown
Contributor

What

Fixes the WhisperX diarization path, which currently fails with:

AttributeError: module 'whisperx' has no attribute 'DiarizationPipeline'

returning HTTP 200 with an empty text whenever a transcription is requested with diarize=true.

Why

The backend pins whisperx @ git+https://github.com/m-bain/whisperX.git (latest). Since WhisperX 3.6.0 the diarization API changed:

  • DiarizationPipeline is no longer re-exported at the top level (whisperx/__init__.py only lazily exposes load_model, load_audio, align, load_align_model, assign_word_speakers, ...). It now lives in whisperx.diarize.
  • Its constructor kwarg was renamed use_auth_token -> token (DiarizationPipeline(model_name=None, token=None, device="cpu", cache_dir=None)).

Change

  • Import DiarizationPipeline from whisperx.diarize.
  • Pass the HF token via token= instead of use_auth_token=.

whisperx.assign_word_speakers(...) is still exported, so it is left unchanged. Two-line change, no behavior change beyond making diarization work again.

Fixes #10388

AI-assisted, human reviewed.

🤖 Generated with Claude Code

Signed-off-by: Anai-Guo <antai12232931@outlook.com>
@Anai-Guo Anai-Guo force-pushed the fix-whisperx-diarization-pipeline branch from 6aa08d1 to 24ee871 Compare June 18, 2026 16:09
@mudler

mudler commented Jun 18, 2026

Copy link
Copy Markdown
Owner

would be nice to have tests catching that, but it puts strain on the CI to test everything - thanks for looking into it

@mudler mudler merged commit c3b3336 into mudler:master Jun 18, 2026
1 check passed
@localai-bot localai-bot added the bug Something isn't working label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

3 participants