-
-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix support for
speechbrain==1.0
(#1659)
- Loading branch information
1 parent
1a5b870
commit bd7b977
Showing
4 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |