Skip to content

Commit

Permalink
Merge branch 'release/3.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
hbredin committed Jun 19, 2024
2 parents adaf770 + 82f345a commit 4dd55a5
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog


## Version 3.3.1 (2024-06-19)

### Breaking changes

- setup: drop support for Python 3.8

### 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/))


## Version 3.3.0 (2024-06-14)

### TL;DR
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/core/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def aggregate(
warm_up: Tuple[float, float] = (0.0, 0.0),
epsilon: float = 1e-12,
hamming: bool = False,
missing: float = np.NaN,
missing: float = np.nan,
skip_average: bool = False,
) -> SlidingWindowFeature:
"""Aggregation
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/pipelines/speaker_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from pyannote.audio.pipelines.utils import PipelineModel, get_model

try:
from speechbrain.pretrained import (
from speechbrain.inference import (
EncoderClassifier as SpeechBrain_EncoderClassifier,
)

Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/tasks/segmentation/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def validation_step(self, batch, batch_idx: int):
)

# reshape target so that there is one line per class when plotting it
y[y == 0] = np.NaN
y[y == 0] = np.nan
if len(y.shape) == 2:
y = y[:, :, np.newaxis]
y *= np.arange(y.shape[2])
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/tasks/segmentation/speaker_diarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ def validation_step(self, batch, batch_idx: int):
)

# reshape target so that there is one line per class when plotting it
y[y == 0] = np.NaN
y[y == 0] = np.nan
if len(y.shape) == 2:
y = y[:, :, np.newaxis]
y *= np.arange(y.shape[2])
Expand Down
2 changes: 1 addition & 1 deletion pyannote/audio/tasks/separation/PixIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ def validation_step(self, batch, batch_idx: int):
)

# reshape target so that there is one line per class when plotting it
y[y == 0] = np.NaN
y[y == 0] = np.nan
if len(y.shape) == 2:
y = y[:, :, np.newaxis]
y *= np.arange(y.shape[2])
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ setup_requires = pyscaffold>=3.2a0,<3.3a0
# Add here dependencies of your project (semicolon/line-separated), e.g.
# install_requires = numpy; scipy
# Require a specific Python version, e.g. Python 2.7 or >= 3.4
python_requires = >=3.7
python_requires = >=3.9

[options.packages.find]
where = .
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
],
)
20 changes: 20 additions & 0 deletions tests/test_speechbrain.py
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)
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.0
3.3.1

0 comments on commit 4dd55a5

Please sign in to comment.