mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
Fix hugging face error
Model should be loaded with an id to avoid this error: huggingface_hub.utils._validators.HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'pyannote\segmentation'.
This commit is contained in:
@ -639,9 +639,10 @@ def cli():
|
||||
if vad_filter:
|
||||
if hf_token is None:
|
||||
print("Warning, no huggingface token used, needs to be saved in environment variable, otherwise will throw error loading VAD model...")
|
||||
from pyannote.audio import Inference
|
||||
from pyannote.audio import Inference, Model
|
||||
vad_pipeline = Inference(
|
||||
"pyannote/segmentation",
|
||||
Model.from_pretrained("pyannote/segmentation",
|
||||
use_auth_token=hf_token),
|
||||
pre_aggregation_hook=lambda segmentation: segmentation,
|
||||
use_auth_token=hf_token,
|
||||
device=torch.device(device),
|
||||
|
Reference in New Issue
Block a user