Skip to content

Commit 4dd55a5

Browse files
committed
Merge branch 'release/3.3.1'
2 parents adaf770 + 82f345a commit 4dd55a5

File tree

12 files changed

+43
-10
lines changed

12 files changed

+43
-10
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest]
16-
python-version: [3.8, 3.9, "3.10"]
16+
python-version: ["3.9", "3.10", "3.11"]
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Set up Python ${{ matrix.python-version }}

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
4+
## Version 3.3.1 (2024-06-19)
5+
6+
### Breaking changes
7+
8+
- setup: drop support for Python 3.8
9+
10+
### Fixes
11+
12+
- fix: fix support for `numpy==2.x` ([@ibevers](https://github.com/ibevers/))
13+
- fix: fix support for `speechbrain==1.x` ([@Adel-Moumen](https://github.com/Adel-Moumen/))
14+
15+
316
## Version 3.3.0 (2024-06-14)
417

518
### TL;DR

pyannote/audio/core/inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ def aggregate(
526526
warm_up: Tuple[float, float] = (0.0, 0.0),
527527
epsilon: float = 1e-12,
528528
hamming: bool = False,
529-
missing: float = np.NaN,
529+
missing: float = np.nan,
530530
skip_average: bool = False,
531531
) -> SlidingWindowFeature:
532532
"""Aggregation

pyannote/audio/pipelines/speaker_verification.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from pyannote.audio.pipelines.utils import PipelineModel, get_model
4141

4242
try:
43-
from speechbrain.pretrained import (
43+
from speechbrain.inference import (
4444
EncoderClassifier as SpeechBrain_EncoderClassifier,
4545
)
4646

pyannote/audio/tasks/segmentation/mixins.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def validation_step(self, batch, batch_idx: int):
401401
)
402402

403403
# reshape target so that there is one line per class when plotting it
404-
y[y == 0] = np.NaN
404+
y[y == 0] = np.nan
405405
if len(y.shape) == 2:
406406
y = y[:, :, np.newaxis]
407407
y *= np.arange(y.shape[2])

pyannote/audio/tasks/segmentation/speaker_diarization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def validation_step(self, batch, batch_idx: int):
818818
)
819819

820820
# reshape target so that there is one line per class when plotting it
821-
y[y == 0] = np.NaN
821+
y[y == 0] = np.nan
822822
if len(y.shape) == 2:
823823
y = y[:, :, np.newaxis]
824824
y *= np.arange(y.shape[2])

pyannote/audio/tasks/separation/PixIT.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ def validation_step(self, batch, batch_idx: int):
11361136
)
11371137

11381138
# reshape target so that there is one line per class when plotting it
1139-
y[y == 0] = np.NaN
1139+
y[y == 0] = np.nan
11401140
if len(y.shape) == 2:
11411141
y = y[:, :, np.newaxis]
11421142
y *= np.arange(y.shape[2])

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pytorch_metric_learning >= 2.1.0
1111
rich >= 12.0.0
1212
semver >= 3.0.0
1313
soundfile >= 0.12.1
14-
speechbrain >= 0.5.14
14+
speechbrain >= 1.0.0
1515
tensorboardX >= 2.6
1616
torch >= 2.0.0
1717
torch_audiomentations >= 0.11.0

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ setup_requires = pyscaffold>=3.2a0,<3.3a0
2727
# Add here dependencies of your project (semicolon/line-separated), e.g.
2828
# install_requires = numpy; scipy
2929
# Require a specific Python version, e.g. Python 2.7 or >= 3.4
30-
python_requires = >=3.7
30+
python_requires = >=3.9
3131

3232
[options.packages.find]
3333
where = .

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
"Intended Audience :: Science/Research",
5757
"License :: OSI Approved :: MIT License",
5858
"Natural Language :: English",
59-
"Programming Language :: Python :: 3.8",
6059
"Programming Language :: Python :: 3.9",
6160
"Programming Language :: Python :: 3.10",
61+
"Programming Language :: Python :: 3.11",
6262
"Topic :: Scientific/Engineering",
6363
],
6464
)

tests/test_speechbrain.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import tempfile
2+
import pytest
3+
from speechbrain.inference import EncoderClassifier
4+
5+
6+
@pytest.fixture()
7+
def cache():
8+
return tempfile.mkdtemp()
9+
10+
def test_import_speechbrain_encoder_classifier(cache):
11+
"""This is a simple test that check if speechbrain
12+
EncoderClassifier can be imported. It does not check
13+
if the model is working properly.
14+
"""
15+
16+
model = EncoderClassifier.from_hparams(
17+
source="speechbrain/spkrec-ecapa-voxceleb",
18+
savedir=cache,
19+
)
20+
assert isinstance(model, EncoderClassifier)

version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.0
1+
3.3.1

0 commit comments

Comments
 (0)