# Patch huggingface_hub to handle deprecated use_auth_token parameter # This is needed because speechbrain uses the old API import huggingface_hub _original_hf_hub_download = huggingface_hub.hf_hub_download def _patched_hf_hub_download(*args, **kwargs): # Convert deprecated use_auth_token to token if 'use_auth_token' in kwargs: kwargs['token'] = kwargs.pop('use_auth_token') return _original_hf_hub_download(*args, **kwargs) huggingface_hub.hf_hub_download = _patched_hf_hub_download # Also patch snapshot_download if it exists if hasattr(huggingface_hub, 'snapshot_download'): _original_snapshot_download = huggingface_hub.snapshot_download def _patched_snapshot_download(*args, **kwargs): if 'use_auth_token' in kwargs: kwargs['token'] = kwargs.pop('use_auth_token') return _original_snapshot_download(*args, **kwargs) huggingface_hub.snapshot_download = _patched_snapshot_download from .analyzer import AudioAnalyzer, AnalysisResult, SpeakerResult __all__ = ['AudioAnalyzer', 'AnalysisResult', 'SpeakerResult']