Closed zaouk closed 2 years ago
@hbredin , I'm still running into this issue with a fresh install of pyannote (using instructions in README). When I call:
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")`
I get this error:
ImportError: 'speechbrain' must be installed to use 'speechbrain/spkrec-ecapa-voxceleb' embeddings. Visit https://speechbrain.github.io for installation instructions
When I run pip3 install speechbrain
, it downgrades torch from 1.12.0 to 1.11.0 and then breaks the torchaudio integration. Any ideas how to fix this?
Thanks a million!
For anyone else running into this issue, it can be solved by using the prior version of Pytorch (1.11.0), which is compatible with speechbrain: https://pytorch.org/get-started/previous-versions/#v1110
conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
Here are the error messages that I was getting before doing this (in case others are googling them).
After pip install speechbrain
...
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.13.0 requires torch==1.12.0, but you have torch 1.11.0 which is incompatible.
And when I ran Pipeline.from_pretrained(...)
(see above comment), the error message I got was related to torchvision (as expected from the pip error):
/usr/local/envs/pyannote/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: /usr/local/envs/pyannote/lib/python3.8/site-packages/torchvision/image.so: undefined symbol: _ZN3c106detail19maybe_wrap_dim_slowEllb
warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
File "test.py", line 1, in <module>
from pyannote.audio import Pipeline
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/pyannote/audio/__init__.py", line 29, in <module>
from .core.inference import Inference
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/pyannote/audio/core/inference.py", line 33, in <module>
from pyannote.audio.core.io import AudioFile
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/pyannote/audio/core/io.py", line 38, in <module>
import torchaudio
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/torchaudio/__init__.py", line 1, in <module>
from torchaudio import ( # noqa: F401
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/torchaudio/_extension.py", line 103, in <module>
_init_extension()
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/torchaudio/_extension.py", line 88, in _init_extension
_load_lib("libtorchaudio")
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/torchaudio/_extension.py", line 51, in _load_lib
torch.ops.load_library(path)
File "/usr/local/envs/pyannote/lib/python3.8/site-packages/torch/_ops.py", line 220, in load_library
ctypes.CDLL(path)
File "/usr/local/envs/pyannote/lib/python3.8/ctypes/__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libtorch_cuda_cpp.so: cannot open shared object file: No such file or directory
Would you mind contributing a PR with an update to the Installation section of the README file?
Describe the bug The
speechbrain
requirement is still missing, and if we try to instantiate apyannote/speaker-diarization
pipeline we get:To Reproduce Steps to reproduce the behavior:
then inside the python shell:
FIX I fixed this by just calling