Skip to content

Commit 0279f21

Browse files
authored
Add workflow for quick Python runs (#194)
1 parent 2eefc81 commit 0279f21

File tree

3 files changed

+60
-43
lines changed

3 files changed

+60
-43
lines changed

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Lint
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- main
77
- develop
88

99
jobs:

.github/workflows/quick-runs.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Quick Runs
5+
6+
on:
7+
pull_request:
8+
branches: [ "main", "develop" ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.8", "3.10"]
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Download data
26+
run: |
27+
mkdir audio rttms trash
28+
wget --no-verbose --show-progress --continue -O audio/ES2002a_long.wav http://groups.inf.ed.ac.uk/ami/AMICorpusMirror/amicorpus/ES2002a/audio/ES2002a.Mix-Headset.wav
29+
wget --no-verbose --show-progress --continue -O audio/ES2002b_long.wav http://groups.inf.ed.ac.uk/ami/AMICorpusMirror/amicorpus/ES2002b/audio/ES2002b.Mix-Headset.wav
30+
wget --no-verbose --show-progress --continue -O rttms/ES2002a_long.rttm https://raw.githubusercontent.com/pyannote/AMI-diarization-setup/main/only_words/rttms/train/ES2002a.rttm
31+
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
32+
- name: Install apt dependencies
33+
run: |
34+
sudo add-apt-repository ppa:savoury1/ffmpeg4
35+
sudo apt-get update
36+
sudo apt-get -y install ffmpeg libportaudio2=19.6.0-1.1 sox
37+
- name: Install pip dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install .
41+
- name: Crop audio and rttm
42+
run: |
43+
sox audio/ES2002a_long.wav audio/ES2002a.wav trim 00:40 00:30
44+
sox audio/ES2002b_long.wav audio/ES2002b.wav trim 00:10 00:30
45+
head -n 4 rttms/ES2002a_long.rttm > rttms/ES2002a.rttm
46+
head -n 7 rttms/ES2002b_long.rttm > rttms/ES2002b.rttm
47+
rm audio/ES2002a_long.wav
48+
rm audio/ES2002b_long.wav
49+
rm rttms/ES2002a_long.rttm
50+
rm rttms/ES2002b_long.rttm
51+
- name: Run stream
52+
run: |
53+
diart.stream audio/ES2002a.wav --output trash --no-plot --hf-token ${{ secrets.HUGGINGFACE }}
54+
- name: Run benchmark
55+
run: |
56+
diart.benchmark audio --reference rttms --batch-size 4 --hf-token ${{ secrets.HUGGINGFACE }}
57+
- name: Run tuning
58+
run: |
59+
diart.tune audio --reference rttms --batch-size 4 --num-iter 2 --output trash --hf-token ${{ secrets.HUGGINGFACE }}

.github/workflows/run-tests.yml

-42
This file was deleted.

0 commit comments

Comments
 (0)