You are getting this error because you are giving wrong parameter. The new parameter is token
pipeline = Pipeline.from_pretrained(
"pyannote/speaker-diarization-3.1",
token="HUGGINGFACE_ACCESS_TOKEN")
Refer to the github of pyannote-audio