Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update branch for PR #319 #352

Merged
merged 98 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
bda9632
Update README.md
groadabike May 18, 2023
abfb956
[pre-commit.ci] pre-commit-autoupdate
pre-commit-ci[bot] May 30, 2023
0708415
Merge pull request #327 from claritychallenge/pre-commit-ci-update-co…
jonbarker68 May 30, 2023
d1e5ac9
Merge pull request #326 from claritychallenge/groadabike-patch-2
groadabike May 30, 2023
1a743ad
Adding ORDA workflow, tweaking README with badge
ns-rse May 30, 2023
14a2ec6
[pre-commit.ci] pre-commit-autoupdate
pre-commit-ci[bot] Jun 13, 2023
70d3fab
Merge pull request #332 from claritychallenge/pre-commit-ci-update-co…
jonbarker68 Jun 19, 2023
c300f0d
Merge pull request #331 from claritychallenge/ns-rse/330-orda
jonbarker68 Jun 19, 2023
34a9797
[pre-commit.ci] pre-commit-autoupdate
pre-commit-ci[bot] Jun 27, 2023
fdf4ed6
Merge pull request #333 from claritychallenge/pre-commit-ci-update-co…
jonbarker68 Jun 29, 2023
3212ed9
[pre-commit.ci] pre-commit-autoupdate
pre-commit-ci[bot] Jul 18, 2023
9950a23
Merge pull request #336 from claritychallenge/pre-commit-ci-update-co…
ns-rse Jul 18, 2023
3d07e1a
[pre-commit.ci] pre-commit-autoupdate
pre-commit-ci[bot] Jul 25, 2023
fc68482
Merge pull request #337 from claritychallenge/pre-commit-ci-update-co…
ns-rse Jul 25, 2023
56686d8
Script to generate ICASSP 2024 dataset
groadabike Sep 11, 2023
cbbaac5
recipe files
groadabike Sep 11, 2023
84e8752
Add source_separation_utils to keep enhance cleaner
groadabike Sep 11, 2023
e035f0a
Add enhancer
groadabike Sep 11, 2023
394d742
evaluate
groadabike Sep 11, 2023
9b1bf5a
Add merge batches
groadabike Sep 11, 2023
95f4ff3
equalization to 2 in HAAQI
groadabike Sep 11, 2023
da4874b
readme
groadabike Sep 11, 2023
333f13b
readme gen dataset
groadabike Sep 11, 2023
d5db771
readme gen dataset
groadabike Sep 12, 2023
dd8aa75
[pre-commit.ci] pre-commit-autoupdate
pre-commit-ci[bot] Sep 12, 2023
ee4c61c
fix output from gen dataset
groadabike Sep 12, 2023
27b9d51
better meta at_mic_music
groadabike Sep 12, 2023
73a07e0
Utilities from v0.3 not in v0.4
groadabike Sep 12, 2023
4ebc0c7
Add apply HA
groadabike Sep 12, 2023
d45a3ac
output sample rate in config
groadabike Sep 12, 2023
0cffe9a
save flac and 32 kHz
groadabike Sep 12, 2023
4c510c8
save flac and 32 kHz
groadabike Sep 12, 2023
32504bd
allows processed and reference different sample rate
groadabike Sep 12, 2023
19180e3
allows processed and reference different sample rate
groadabike Sep 12, 2023
e6912d7
reading flac and evaluate
groadabike Sep 12, 2023
6b1db3c
test enhance
groadabike Sep 12, 2023
a85508e
move source separation to utils
groadabike Sep 12, 2023
4a2667b
move source separation to utils
groadabike Sep 12, 2023
7e953cb
test for source separation to utils
groadabike Sep 12, 2023
f8b53fa
test for source separation to utils
groadabike Sep 12, 2023
29defd1
add missing annotations
groadabike Sep 12, 2023
46ef9e9
fix name of resource
groadabike Sep 12, 2023
4f91952
test evaluate
groadabike Sep 12, 2023
4b4a339
Class ResultFile is very similar in all recipies. Change it to DataCl…
groadabike Sep 12, 2023
8fd0d29
test for generates at mic dataset
groadabike Sep 12, 2023
5c57842
test for generates at mic dataset
groadabike Sep 12, 2023
1af34c9
add generate train scenes
groadabike Sep 13, 2023
6bf5aa9
rename generate train data
groadabike Sep 13, 2023
1acbe7b
teats for generates modules
groadabike Sep 13, 2023
a8743c1
generates scenes
groadabike Sep 13, 2023
d457e90
soft clip False
groadabike Sep 13, 2023
e003325
random choice replace = False
groadabike Sep 13, 2023
c8a80b4
head_position to head_loudspeaker_position
groadabike Sep 13, 2023
e5e20e6
head_position to head_loudspeaker_position
groadabike Sep 13, 2023
95ca9a5
default to valid in config
groadabike Sep 13, 2023
5fbd656
start processing count from 1 and not 0
groadabike Sep 13, 2023
a724597
renaming file to scene_id-listener
groadabike Sep 13, 2023
7826d74
evaluate
groadabike Sep 13, 2023
fa4ead0
add pyflac to requirement
groadabike Sep 13, 2023
749f548
add equalisation param in cad1 evaluate
groadabike Sep 13, 2023
d44b14f
add recommendation from precommit
groadabike Sep 13, 2023
90e0810
correct call to compute haqqi
groadabike Sep 13, 2023
b809dfa
fix test in CAD1
groadabike Sep 13, 2023
62ac4f3
change test smearing to obtained value
groadabike Sep 13, 2023
c9cc493
reverse las change
groadabike Sep 13, 2023
b11f69d
add scores
groadabike Sep 13, 2023
a7e7a39
Update exact check in tutorial as requested by precommit
groadabike Sep 14, 2023
c138aa0
Add haaqi sample rate param
groadabike Sep 15, 2023
b5dc6ea
resample signal before calling HAAQI
groadabike Sep 15, 2023
aa8d222
correct baseline scores
groadabike Sep 15, 2023
04a7e82
pin numpy version < 1.25
groadabike Sep 15, 2023
a16e293
pin numpy version < 1.25
groadabike Sep 15, 2023
4058090
numpy version
groadabike Sep 15, 2023
8169b72
source separation util tests
groadabike Sep 15, 2023
eba339c
source separation util tests
groadabike Sep 15, 2023
1663f32
Merge pull request #338 from claritychallenge/pre-commit-ci-update-co…
groadabike Sep 15, 2023
40ccda0
test result support
groadabike Sep 15, 2023
950c69f
test source separation
groadabike Sep 15, 2023
409e8b3
Merge pull request #343 from claritychallenge/main
groadabike Sep 15, 2023
7dc037e
the readme
groadabike Sep 15, 2023
92b444f
test flac encoder
groadabike Sep 15, 2023
b005f41
Merge pull request #340 from claritychallenge/339-icassp-2024-cadenza…
groadabike Sep 15, 2023
3660f22
Update README.md
groadabike Sep 15, 2023
e4656ec
Merge pull request #344 from claritychallenge/groadabike-patch-1
groadabike Sep 17, 2023
c50ffe1
Fixed smear3 to work with newer numpy versions
jonbarker68 Sep 17, 2023
752d230
Removed the pyproject.toml constaint on numpy
jonbarker68 Sep 17, 2023
8c195bf
Merge pull request #346 from claritychallenge/345-bug-smearer-tests-a…
jonbarker68 Sep 18, 2023
01b1660
head_loudspeaker_position
groadabike Sep 19, 2023
e34d767
head_loudspeaker_position
groadabike Sep 19, 2023
276c0c0
no validation score
groadabike Sep 19, 2023
d4893ab
better readme
groadabike Sep 19, 2023
acec881
correct challenge version in Readme
groadabike Sep 20, 2023
5b236d0
correct challenge version in Readme
groadabike Sep 20, 2023
58779d0
correct challenge version in Readme
groadabike Sep 20, 2023
b54e159
search precreated only in train
groadabike Sep 20, 2023
2c1fc94
ensure the pre-created completed all tracks
groadabike Sep 20, 2023
32f86ba
test pre-created
groadabike Sep 20, 2023
dd866c1
Merge pull request #349 from claritychallenge/347-bug-icassp-2024-is-…
groadabike Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/ORDA.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release to ORDA
on:
workflow_dispatch:
release:
types: [published]
jobs:
upload:
runs-on: ubuntu-latest
env:
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}
steps:
- name: prepare-data-folder
run : mkdir 'data'
- name: download-archive
run: |
curl -sL "${{ github.event.release.zipball_url }}" > "$ARCHIVE_NAME".zip
curl -sL "${{ github.event.release.tarball_url }}" > "$ARCHIVE_NAME".tar.gz
- name: move-archive
run: |
mv "$ARCHIVE_NAME".zip data/
mv "$ARCHIVE_NAME".tar.gz data/
- name: upload-to-figshare
uses: figshare/[email protected]
with:
FIGSHARE_TOKEN: ${{ secrets.FIGSHARE_TOKEN }}
FIGSHARE_ENDPOINT: 'https://api.figshare.com/v2'
FIGSHARE_ARTICLE_ID: 23230694
DATA_DIR: 'data'
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ repos:
- id: check-toml

- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.9.1
hooks:
- id: black
types: [python]
additional_dependencies: ["click==8.0.4"]

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.7.1
rev: v0.9.2
hooks:
- id: markdownlint-cli2

- repo: https://github.com/pycqa/flake8.git
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-print, Flake8-pyproject]
Expand All @@ -65,21 +65,21 @@ repos:
- id: nbstripout

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.5.1
hooks:
- id: mypy
args:
- --explicit-package-bases

- repo: https://github.com/charliermarsh/ruff-pre-commit
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.0.267"
rev: "v0.0.288"
hooks:
- id: ruff

# Serious pylint errors that will be enforced by CI
- repo: https://github.com/pycqa/pylint
rev: v3.0.0a6
rev: v3.0.0a7
hooks:
- id: pylint
args:
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/claritychallenge/clarity/main.svg)](https://results.pre-commit.ci/latest/github/claritychallenge/clarity/main)
[![Downloads](https://pepy.tech/badge/pyclarity)](https://pepy.tech/project/pyclarity)

[![PyPI](https://img.shields.io/static/v1?label=CAD1%20and%20CPC2%20Challenges%20-%20pypi&message=v0.3.2&color=orange)](https://pypi.org/project/pyclarity/0.3.2/)
[![PyPI](https://img.shields.io/static/v1?label=ICASSP%202024%20Cadenza%20Challenge%20-%20pypi&message=v0.4.1&color=orange)](https://pypi.org/project/pyclarity/0.4.1/)
[![PyPI](https://img.shields.io/static/v1?label=CAD1%20and%20CPC2%20Challenges%20-%20pypi&message=v0.3.4&color=orange)](https://pypi.org/project/pyclarity/0.3.4/)
[![PyPI](https://img.shields.io/static/v1?label=ICASSP%202023%20Challenge%20-%20pypi&message=v0.2.1&color=orange)](https://pypi.org/project/pyclarity/0.2.1/)
[![PyPI](https://img.shields.io/static/v1?label=CEC2%20Challenge%20-%20pypi&message=v0.1.1&color=orange)](https://pypi.org/project/pyclarity/0.1.1/)

[![ORDA](https://img.shields.io/badge/ORDA--DOI-10.15131%2Fshef.data.23230694.v.1-lightgrey)](https://figshare.shef.ac.uk/articles/software/clarity/23230694/1)
</p>

</div>
Expand All @@ -34,10 +36,11 @@ In this repository, you will find code to support all Clarity and Cadenza Challe

## Current Events

- The first Cadenza Challenge (CAD1) is now open. :fire::fire:
- The ICASSP 2024 Cadenza Challenge (CAD_ICASSP_2024) is now open. :fire::fire:
- Join the [Cadenza Challenge Group](https://groups.google.com/g/cadenza-challenge) to keep up-to-date on developments.
- Visit the Cadenenza Challenge [website](https://cadenzachallenge.org/) for more details.
- Evaluation tools and a baseline system are available in the [CAD1 recipes](./recipes/cad1) folder. :new:
- The first Cadenza Challenge (CAD1) is closed.
- Subjective Evaluation is underway. :new:
- The 2nd Clarity Prediction Challenge (CPC2) is now open. :fire::fire:
- Join the [Clarity Challenge Group](https://groups.google.com/g/clarity-challenge) to keep up-to-date on developments.
- Visit the Clarity Challenge [website](https://claritychallenge.org/) for more details.
Expand Down Expand Up @@ -86,11 +89,12 @@ pip install -e git+https://github.com/claritychallenge/clarity.git@main

Current challenge

- [The 1st Cadenza Challenge (CAD1)](./recipes/cad1)
- [The 2nd Clarity Prediction Challenge (CPC2)](./recipes/cpc2)
- [The ICASSP 2024 Cadenza Challenge](./recipes/cad_icassp_2024)

Previous challenges

- [The 1st Cadenza Challenge (CAD1)](./recipes/cad1)
- [The 2nd Clarity Prediction Challenge (CPC2)](./recipes/cpc2)
- [The ICASSP 2023 Enhancement Challenge](./recipes/icassp_2023)
- [The 2nd Clarity Enhancement Challenge (CEC2)](./recipes/cec2)
- [The 1st Clarity Prediction Challenge (CPC1)](./recipes/cpc1)
Expand Down
10 changes: 6 additions & 4 deletions clarity/evaluator/haaqi/haaqi.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ def haaqi_v1(
def compute_haaqi(
processed_signal: ndarray,
reference_signal: ndarray,
processed_sample_rate: float,
reference_sample_rate: float,
audiogram: Audiogram,
sample_rate: float,
equalisation: int = 1,
level1: float = 65.0,
) -> float:
Expand All @@ -191,8 +192,9 @@ def compute_haaqi(
reference_signal (np.ndarray): Input reference speech signal with no noise
or distortion. If a hearing loss is specified, NAL-R equalization
is optional
processed_sample_rate (float): Sampling rate in Hz for processed signal.
reference_sample_rate (float): Sampling rate in Hz for reference signal.
audiogram (Audiogram): Audiogram object.
sample_rate (int): Sample rate in Hz.
equalisation (int): hearing loss equalization mode for reference signal:
1 = no EQ has been provided, the function will add NAL-R
2 = NAL-R EQ has already been added to the reference signal
Expand All @@ -211,9 +213,9 @@ def compute_haaqi(

score, _, _, _ = haaqi_v1(
reference=reference_signal,
reference_freq=sample_rate,
reference_freq=reference_sample_rate,
processed=processed_signal,
processed_freq=sample_rate,
processed_freq=processed_sample_rate,
audiogram=audiogram,
equalisation=equalisation,
level1=level1,
Expand Down
7 changes: 4 additions & 3 deletions clarity/evaluator/msbg/smearing.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ def smear3(f_smear: ndarray, inbuffer: ndarray) -> ndarray:
winwave = np.zeros(FFT_SIZE)
winwave[0:FRAME_SIZE] = window * inwave.flatten()
spectrum = np.fft.fft(winwave, FFT_SIZE)
power = spectrum[0:nyquist] * np.conj(spectrum[0:nyquist])
mag = np.sqrt(power)

mag = np.abs(spectrum[0:nyquist])
phasor = spectrum[0:nyquist] / (mag + (mag == 0))
smeared = np.dot(f_smear, power)

smeared = np.dot(f_smear, (mag**2).astype(complex))
spectrum[0:nyquist] = np.sqrt(smeared) * phasor
spectrum[nyquist] = 0
spectrum[(nyquist + 1) : FFT_SIZE] = np.conj(spectrum[nyquist - 1 : 0 : -1])
Expand Down
Loading
Loading