Import Error While Installing SpeechBrain

#12
by mueksh - opened

load pyannote.audio speaker diarization

from pyannote.audio import Pipeline
speaker_diarization = Pipeline.from_pretrained("pyannote/speaker-diarization@2.1", use_auth_token=True)

this code getting error like: Lightning automatically upgraded your loaded checkpoint from v1.5.4 to v2.2.2. To apply the upgrade to your files permanently, run python -m pytorch_lightning.utilities.upgrade_checkpoint C:\Users\Dhruveel\.cache\torch\pyannote\models--pyannote--segmentation\snapshots\c4c8ceafcbb3a7a280c2d357aee9fbc9b0be7f9b\pytorch_model.bin
Model was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x.
Model was trained with torch 1.10.0+cu102, yours is 2.2.2+cpu. Bad things might happen unless you revert torch to 1.x.
Traceback (most recent call last):
File "C:\Users\Dhruveel\PycharmProjects\Speech-Recognition-Speech-Identification\diarization.py", line 3, in
speaker_diarization = Pipeline.from_pretrained("pyannote/speaker-diarization@2.1", use_auth_token=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dhruveel\PycharmProjects\Speech-Recognition-Speech-Identification.venv\Lib\site-packages\pyannote\audio\core\pipeline.py", line 136, in from_pretrained
pipeline = Klass(**params)
^^^^^^^^^^^^^^^
File "C:\Users\Dhruveel\PycharmProjects\Speech-Recognition-Speech-Identification.venv\Lib\site-packages\pyannote\audio\pipelines\speaker_diarization.py", line 167, in init
self._embedding = PretrainedSpeakerEmbedding(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dhruveel\PycharmProjects\Speech-Recognition-Speech-Identification.venv\Lib\site-packages\pyannote\audio\pipelines\speaker_verification.py", line 754, in PretrainedSpeakerEmbedding
return SpeechBrainPretrainedSpeakerEmbedding(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Dhruveel\PycharmProjects\Speech-Recognition-Speech-Identification.venv\Lib\site-packages\pyannote\audio\pipelines\speaker_verification.py", line 245, in init
raise ImportError(
ImportError: 'speechbrain' must be installed to use 'speechbrain/spkrec-ecapa-voxceleb' embeddings. Visit https://speechbrain.github.io for installation instructions.

@mueksh
you need to install different version of speechbrain to solve this error , pip install speechbrain==0.5.16
and restart the kernel and run it again
it should resolve this error

Sign up or log in to comment