fix(diarization): upgrade bootstrap to pyannote.audio>=4 (fixes #3) - #5
Merged
Merged
Conversation
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.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3 — diarization failed on fresh installs with
TypeError: Pipeline.from_pretrained() got an unexpected keyword argument 'token'(and'plda'after patching touse_auth_token).Root cause
whisply 0.14.1hard-pinspyannote.audio==3.4.0/whisperx==3.7.8. The bootstrap only ranuv pip install "whisply[mlx]", so fresh installs landed on pyannote 3.4.0. But the diarization path loadspyannote/speaker-diarization-community-1withtoken=, which require pyannote.audio ≥ 4.0 (3.x usesuse_auth_tokenand lacks community-1's PLDA clustering). My venv was manually on the tested4.0.4 / 3.8.6baseline, so it never surfaced locally.Fix
transcribe.sh: bootstrap now upgrades towhisperx>=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 whisperxmade lazy so the module is unit-testable.setup.mdinstall + troubleshooting;CHANGELOG; plus adocs/adr-faster-whisper.mdnoting 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).