Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: 'speechbrain' must be installed to use 'speechbrain/spkrec-ecapa-voxceleb' embeddings. Visit https://speechbrain.github.io for installation instructions. #1661

Closed
YugwonWon opened this issue Mar 1, 2024 · 7 comments

Comments

@YugwonWon
Copy link

Tested versions

  • Reproducible 3.1 more

System information

ubuntu 18 pyannote.audio==3.1.1

Issue description

When I install pyannote.audio from python, it also installs the speechbrain package, but it doesn't create a pretrained folder. Originally, the old version had a speechbrain folder, and inside it was a pretrained folder. I installed the new version of pyannote while setting up a new venv, and this happened. I copied the contents of the old version's pretrained folder and ran it, but the function pretrainer.load_collected(device="cpu") on line 141 of interpaces.py doesn't expect a value of device. What should I do?

Minimal reproduction example (MRE)

https://colab.research.google.com/drive/1edF4nPYc8CuTa7gAgr-_9opWeQe1LhED?usp=sharing

@lgq-liao
Copy link

lgq-liao commented Mar 1, 2024

from speaker_verification.py
the following import will fail as well,

from speechbrain.pretrained import (
        EncoderClassifier as SpeechBrain_EncoderClassifier,
    )

because spechbrain does NOT have pretrained module

@hbredin
Copy link
Member

hbredin commented Mar 1, 2024

Currently being look at in PR #1659.

@leolulu
Copy link

leolulu commented Mar 6, 2024

Did you upgrade your code to 3.1 according to the README?

Install [pyannote.audio](https://github.com/pyannote/pyannote-audio) with pip install pyannote.audio
Accept [pyannote/segmentation-3.0](https://hf.co/pyannote/segmentation-3.0) user conditions
Accept [pyannote/speaker-diarization-3.1](https://hf.co/pyannote/speaker-diarization-3.1) user conditions
Create access token at [hf.co/settings/tokens](https://hf.co/settings/tokens).

from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained(
    "pyannote/speaker-diarization-3.1",
    use_auth_token="HUGGINGFACE_ACCESS_TOKEN_GOES_HERE")

@YugwonWon
Copy link
Author

I modified the code to match the readme and it worked, thank you.

jhmejia added a commit to TCU-ClassifAI/speechbox that referenced this issue Mar 11, 2024
@leminhnguyen
Copy link

Change from:

from speechbrain.pretrained import (
        EncoderClassifier as SpeechBrain_EncoderClassifier,
    )

to

    from speechbrain.inference.speaker import (
        EncoderClassifier as SpeechBrain_EncoderClassifier,
    )

Will solve the issue!!!

@gittb
Copy link

gittb commented Jun 22, 2024

Change from:

from speechbrain.pretrained import (
        EncoderClassifier as SpeechBrain_EncoderClassifier,
    )

to

    from speechbrain.inference.speaker import (
        EncoderClassifier as SpeechBrain_EncoderClassifier,
    )

Will solve the issue!!!

The above change from @leminhnguyen was still needed when running the pyannote/speech-separation-ami-1.0 pipeline.

Looks like the change has been made in source but not in the the current pip package.

@hbredin
Copy link
Member

hbredin commented Jun 23, 2024

Version 3.3.1 fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants