Skip to content

fix(diarization): upgrade bootstrap to pyannote.audio>=4 (fixes #3) - #5

Merged
AlexanderAbramovPav merged 1 commit into
mainfrom
fix/issue-3-diarization-pyannote4
Jun 17, 2026
Merged

AlexanderAbramovPav merged 1 commit into
mainfrom
fix/issue-3-diarization-pyannote4

Conversation

@AlexanderAbramovPav

Copy link
Copy Markdown
Owner

Summary

Fixes #3 — diarization failed on fresh installs with TypeError: Pipeline.from_pretrained() got an unexpected keyword argument 'token' (and 'plda' after patching to use_auth_token).

Root cause

whisply 0.14.1 hard-pins pyannote.audio==3.4.0 / whisperx==3.7.8. The bootstrap only ran uv pip install "whisply[mlx]", so fresh installs landed on pyannote 3.4.0. But the diarization path loads pyannote/speaker-diarization-community-1 with token=, which require pyannote.audio ≥ 4.0 (3.x uses use_auth_token and lacks community-1's PLDA clustering). My venv was manually on the tested 4.0.4 / 3.8.6 baseline, so it never surfaced locally.

Fix

  • transcribe.sh: bootstrap now upgrades to whisperx>=3.8.6 + pyannote.audio>=4.0, and self-heals venvs created before this fix (fast idempotent major-version probe).
  • transcribe_whisperx.py: preflight version guard → actionable message + graceful skip on pyannote < 4, instead of a cryptic crash. import whisperx made lazy so the module is unit-testable.
  • Tests: cover the version guard (runs in the pytest+numpy-only CI).
  • Docs: setup.md install + troubleshooting; CHANGELOG; plus a docs/adr-faster-whisper.md noting faster-whisper is already the whisperX engine (direct integration rejected).

Verification

  • pytest tests/51 passed (48 existing + 3 new).
  • uv pip install --dry-run --upgrade "whisperx>=3.8.6" "pyannote.audio>=4.0" resolves cleanly over whisply's == pins (no whisperx/pyannote downgrade).

whisply 0.14.1 hard-pins pyannote.audio==3.4.0 / whisperx==3.7.8, but the
diarization path loads pyannote/speaker-diarization-community-1 with `token=`,
which require pyannote.audio>=4.0. Fresh installs therefore failed with
`unexpected keyword argument 'token'` (and `'plda'` after patching to
use_auth_token). The author's venv was manually on the 4.0.4/3.8.6 baseline,
so it never surfaced locally.

- transcribe.sh: bootstrap now upgrades to whisperx>=3.8.6 + pyannote.audio>=4.0
  and self-heals pre-fix venvs (idempotent major-version probe).
- transcribe_whisperx.py: lazy `import whisperx` (module now importable without
  the ML stack) + preflight version guard that emits an actionable message and
  skips diarization gracefully on pyannote<4 instead of a cryptic TypeError.
- tests: unit-test the version guard (runs in the pytest+numpy-only CI).
- setup.md / CHANGELOG: document the baseline + troubleshooting.
- docs/adr-faster-whisper.md: faster-whisper is already the whisperX engine; a
  direct integration is rejected.
@AlexanderAbramovPav
AlexanderAbramovPav merged commit a494166 into main Jun 17, 2026
2 checks passed
@AlexanderAbramovPav
AlexanderAbramovPav deleted the fix/issue-3-diarization-pyannote4 branch June 17, 2026 13:36
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.

[bug] Diarization error

1 participant