From b44454f8dcbfe13893072b4cc89e406e41ced947 Mon Sep 17 00:00:00 2001 From: Juan Coria Date: Sat, 29 Jun 2024 00:08:52 +0200 Subject: [PATCH 1/4] Limit numpy version to < 2.0.0 (#243) --- requirements.txt | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index d6a7aee6..03e18829 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy>=1.20.2 +numpy>=1.20.2,<2.0.0 matplotlib>=3.3.3,<3.6.0 rx>=3.2.0 scipy>=1.6.0 diff --git a/setup.cfg b/setup.cfg index 6c956f45..9f1ad091 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,7 @@ package_dir= =src packages=find: install_requires= - numpy>=1.20.2 + numpy>=1.20.2,<2.0.0 matplotlib>=3.3.3,<3.6.0 rx>=3.2.0 scipy>=1.6.0 From 0a4febd427146da7120e2a37c9ef38ffa9be729a Mon Sep 17 00:00:00 2001 From: hmehdi515 Date: Mon, 8 Jul 2024 05:13:20 -0400 Subject: [PATCH 2/4] Fix embedding extraction example in README (#241) * Updated readme embed-extraction pipeline * Updated readme embed-extraction pipeline * Update README.md * Apply suggestions from code review * Update README.md * Update README.md --------- Co-authored-by: Juan Coria --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f9a89dbc..42bf3da3 100644 --- a/README.md +++ b/README.md @@ -284,21 +284,27 @@ Obtain overlap-aware speaker embeddings from a microphone stream: ```python import rx.operators as ops import diart.operators as dops -from diart.sources import MicrophoneAudioSource +from diart.sources import MicrophoneAudioSource, FileAudioSource from diart.blocks import SpeakerSegmentation, OverlapAwareSpeakerEmbedding segmentation = SpeakerSegmentation.from_pretrained("pyannote/segmentation") embedding = OverlapAwareSpeakerEmbedding.from_pretrained("pyannote/embedding") -mic = MicrophoneAudioSource() + +source = MicrophoneAudioSource() +# To take input from file: +# source = FileAudioSource("", sample_rate=16000) + +# Make sure the models have been trained with this sample rate +print(source.sample_rate) stream = mic.stream.pipe( # Reformat stream to 5s duration and 500ms shift - dops.rearrange_audio_stream(sample_rate=segmentation.model.sample_rate), + dops.rearrange_audio_stream(sample_rate=source.sample_rate), ops.map(lambda wav: (wav, segmentation(wav))), ops.starmap(embedding) ).subscribe(on_next=lambda emb: print(emb.shape)) -mic.read() +source.read() ``` Output: From c2e3d8dee65f240f28ad154e5cec568c21a95049 Mon Sep 17 00:00:00 2001 From: Jakob Drachmann Havtorn Date: Tue, 11 Feb 2025 15:00:18 +0100 Subject: [PATCH 3/4] Upgrade Python support from 3.8-3.10 to 3.10-3.12 (#269) * Adapt actions to run with 3.10-3.12 * Upgrade matplotlib * Upgrade matplotlib * Remove comments * Remove whitespace * Change python versions to string Co-authored-by: Juan Coria * Remove custom repository for ffmpeg in workflows * Apply suggestions from code review --------- Co-authored-by: Juan Coria --- .github/workflows/pytest.yml | 11 +++++++---- .github/workflows/quick-runs.yml | 5 ++--- requirements.txt | 2 +- setup.cfg | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 067b7907..dace440f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -10,20 +10,23 @@ jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: - python-version: '3.10' + python-version: ${{ matrix.python-version }} - name: Install apt dependencies run: | - sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update - sudo apt-get -y install ffmpeg libportaudio2=19.6.0-1.1 + sudo apt-get -y install ffmpeg libportaudio2 - name: Install pip dependencies run: | diff --git a/.github/workflows/quick-runs.yml b/.github/workflows/quick-runs.yml index 24b7f387..dab0400f 100644 --- a/.github/workflows/quick-runs.yml +++ b/.github/workflows/quick-runs.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.10"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -31,9 +31,8 @@ jobs: wget --no-verbose --show-progress --continue -O rttms/ES2002b_long.rttm https://raw.githubusercontent.com/pyannote/AMI-diarization-setup/main/only_words/rttms/train/ES2002b.rttm - name: Install apt dependencies run: | - sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update - sudo apt-get -y install ffmpeg libportaudio2=19.6.0-1.1 sox + sudo apt-get -y install ffmpeg libportaudio2 sox - name: Install pip dependencies run: | python -m pip install --upgrade pip diff --git a/requirements.txt b/requirements.txt index 03e18829..8fe2a539 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ numpy>=1.20.2,<2.0.0 -matplotlib>=3.3.3,<3.6.0 +matplotlib>=3.3.3,<4.0.0 rx>=3.2.0 scipy>=1.6.0 sounddevice>=0.4.2 diff --git a/setup.cfg b/setup.cfg index 9f1ad091..85eb3c72 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,7 +21,7 @@ package_dir= packages=find: install_requires= numpy>=1.20.2,<2.0.0 - matplotlib>=3.3.3,<3.6.0 + matplotlib>=3.3.3,<4.0.0 rx>=3.2.0 scipy>=1.6.0 sounddevice>=0.4.2 From fb7d5d541172ca0282ee88f71af1eb2c7dc78d76 Mon Sep 17 00:00:00 2001 From: Juan Coria Date: Tue, 11 Feb 2025 17:03:18 +0100 Subject: [PATCH 4/4] Bump up version to 0.9.2 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 85eb3c72..a3243f37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name=diart -version=0.9.1 +version=0.9.2 author=Juan Manuel Coria description=A python framework to build AI for real-time speech long_description=file: README.md