huggingface / huggingface/speechbox

TypeError: AutomaticSpeechRecognitionPipeline._sanitize_parameters() got an unexpected keyword argument 'use_auth_token'

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
357
Forks
40
PR merge metrics
No merged PRs in 30d

Description

```python
from speechbox import ASRDiarizationPipeline
from pyannote.audio.pipelines.utils.hook import ProgressHook

pipe = ASRDiarizationPipeline.from_pretrained(asr_model="openai/whisper-base", diarizer_model="pyannote/speaker-diarization-3.1")

with ProgressHook() as hook:
output = pipe("audio.mp3", hook=hook)
```

Error

```bash
/opt/homebrew/lib/python3.12/site-packages/pyannote/audio/core/io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
torchaudio.set_audio_backend("soundfile")
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Traceback (most recent call last):
File "/Users/user/asr/main.py", line 21, in
pipe = ASRDiarizationPipeline.from_pretrained(asr_model="openai/whisper-base", diarizer_model="pyannote/speaker-diarization-3.1")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/speechbox/diarize.py", line 33, in from_pretrained
asr_pipeline = pipeline(
^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/transformers/pipelines/__init__.py", line 1107, in pipeline
return pipeline_class(model=model, framework=framework, task=task, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/transformers/pipelines/automatic_speech_recognition.py", line 220, in __init__
super().__init__(model, tokenizer, feature_extractor, device=device, torch_dtype=torch_dtype, **kwargs)
File "/opt/homebrew/lib/python3.12/site-packages/transformers/pipelines/base.py", line 886, in __init__
self._preprocess_params, self._forward_params, self._postprocess_params = self._sanitize_parameters(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AutomaticSpeechRecognitionPipeline._sanitize_parameters() got an unexpected keyword argument 'use_auth_token'
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.