Skip to content

Add token alias for Whisper model loading#1407

Open
bobsummerwill wants to merge 1 commit intom-bain:mainfrom
bobsummerwill:fix/token-alias-load-model
Open

Add token alias for Whisper model loading#1407
bobsummerwill wants to merge 1 commit intom-bain:mainfrom
bobsummerwill:fix/token-alias-load-model

Conversation

@bobsummerwill
Copy link
Copy Markdown

@bobsummerwill bobsummerwill commented Apr 16, 2026

Summary

Adds a token alias to whisperx.asr.load_model() while preserving the existing use_auth_token argument for backward compatibility.

Why

WhisperX has already migrated its pyannote-facing code to token, but the ASR model-loading surface still exposed use_auth_token.

The remaining internal use still needs to be forwarded to faster-whisper, whose current WhisperModel API expects use_auth_token.

This change updates the WhisperX API surface to accept token consistently without breaking the downstream faster-whisper call.

Changes

  • add token as the preferred alias in whisperx.asr.load_model()
  • keep use_auth_token as a legacy alias for backward compatibility
  • raise a ValueError if both are passed with conflicting values
  • update whisperx/transcribe.py to pass token=hf_token

Validation

  • python3 -m py_compile whisperx/asr.py whisperx/transcribe.py

Fixes #1406

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.

Released wheel still uses use_auth_token in whisperx/asr.py with pyannote 4.x

1 participant