mirror of
https://github.com/Mintplex-Labs/pyannote-audio-legacy.git
synced 2026-07-01 20:24:10 -04:00
fix: fix support for speechbrain==1.0 (#1659)
* fixes #1727 * fixes #1677
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
### Fixes
|
||||
|
||||
- fix: fix support for `numpy==2.x` ([@ibevers](https://github.com/ibevers/))
|
||||
- fix: fix support for `speechbrain==1.x` ([@Adel-Moumen](https://github.com/Adel-Moumen/))
|
||||
|
||||
### Breaking changes
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ from pyannote.audio.core.model import CACHE_DIR
|
||||
from pyannote.audio.pipelines.utils import PipelineModel, get_model
|
||||
|
||||
try:
|
||||
from speechbrain.pretrained import (
|
||||
from speechbrain.inference import (
|
||||
EncoderClassifier as SpeechBrain_EncoderClassifier,
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ pytorch_metric_learning >= 2.1.0
|
||||
rich >= 12.0.0
|
||||
semver >= 3.0.0
|
||||
soundfile >= 0.12.1
|
||||
speechbrain >= 0.5.14
|
||||
speechbrain >= 1.0.0
|
||||
tensorboardX >= 2.6
|
||||
torch >= 2.0.0
|
||||
torch_audiomentations >= 0.11.0
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import tempfile
|
||||
import pytest
|
||||
from speechbrain.inference import EncoderClassifier
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def cache():
|
||||
return tempfile.mkdtemp()
|
||||
|
||||
def test_import_speechbrain_encoder_classifier(cache):
|
||||
"""This is a simple test that check if speechbrain
|
||||
EncoderClassifier can be imported. It does not check
|
||||
if the model is working properly.
|
||||
"""
|
||||
|
||||
model = EncoderClassifier.from_hparams(
|
||||
source="speechbrain/spkrec-ecapa-voxceleb",
|
||||
savedir=cache,
|
||||
)
|
||||
assert isinstance(model, EncoderClassifier)
|
||||
Reference in New Issue
Block a user