Projects Newly released projects
ecma418-torch
Newly released project. First published on GitHub on 2026-10-11 (version 0.1.0 in its metadata); no release or PyPI package yet. Not yet seen to be widely used in the community. Check its validation before relying on it.
Roughness (Clause 7) and fluctuation strength (Clause 9) of ECMA-418-2:2025 (4th edition) in PyTorch, differentiable end to end, with the binaural combination of two channels. The code cites the formula numbers of the standard and lists the places where it reads a printed formula differently.
| Repository | https://github.com/agrathwohl/ecma418-torch |
|---|---|
| Documentation | https://github.com/agrathwohl/ecma418-torch#readme |
| Language | Python |
| Kind | Library/Toolbox Functions to call from your own code: a Python package, a MATLAB toolbox, or a C, C++, C#, Rust or Julia library. |
| Group | newly released First released less than about a year ago, and not yet seen to be widely used in the community. |
| Licence | MIT |
| Latest release | no release |
| Last commit | 2026-10-11 active |
| Maintainers | Andrew Grathwohl |
| AI assistance | not stated |
| How to cite | The project does not say how to cite it. Cite the repository with the version or commit you used. |
| Entry checked | 17 October 2026 |
What it implements
| Metric | Edition | Functions | Validation (as stated) | Notes |
|---|---|---|---|---|
| Sottek Hearing Model roughness | ECMA-418-2:2025 (4th ed.) with binaural combination; without the optional entropy weighting of Section 7.1.6 | roughness | compared with sottek-hearing-model and ArtemiS SUITE (HEAD acoustics) | new |
| Sottek Hearing Model fluctuation strength | ECMA-418-2:2025 (4th ed.) with binaural combination | fluctuation_strength | compared with sottek-hearing-model and ArtemiS SUITE (HEAD acoustics) | new |
How it was validated
As reported by the project; LISQM has not run the code. Two implementations that agree can still share the same error. Kinds of evidence.
- Sottek Hearing Model roughness · ECMA-418-2:2025 (4th ed.)
compared with sottek-hearing-model and ArtemiS SUITE (HEAD acoustics)
- The 1 kHz tone amplitude-modulated at 70 Hz (60 dB SPL) gives 0.9999987 asper for 10 s (the test allows 1e-4 around 1), and the average specific roughness in band 17 is 0.37348, against 0.374 from ArtemiS v17 as quoted in the tests of sottek-hearing-model.
- Against sottek-hearing-model run as an oracle on three signals (the calibration tone, noise and a mixture of modulated tones and noise), the time-dependent values differ by at most 2e-5 asper and the single values by at most 2e-5; the README traces the residual to the rounded filter coefficients.
- The tests also check that two identical channels give the mono result and that input at 44.1 kHz gives the 48 kHz result within 0.2 %.
- Sottek Hearing Model fluctuation strength · ECMA-418-2:2025 (4th ed.)
compared with sottek-hearing-model and ArtemiS SUITE (HEAD acoustics)
- The 1 kHz tone amplitude-modulated at 4 Hz (60 dB SPL) gives 0.99579 vacil for 10 s (the test allows 1e-2 around 1), and the average specific fluctuation strength in band 17 is 0.38876, against 0.395 from ArtemiS v17 as quoted in the tests of sottek-hearing-model.
- Against sottek-hearing-model run as an oracle on two signals: with that package's three choices, the time-dependent values differ by at most 6.3e-5 vacil and the single values by at most 6.3e-5; with the defaults, which follow the printed text, the single values differ by 0.2 % and 0.5 %.
Before you compare numbers
Implementations of the same metric can give different numbers without either being wrong. Check these choices first.
- Input at other sample rates is resampled to 48 kHz (band-limited, by the Fourier method).
- The single value is the 90th percentile from
torch.quantile(linear interpolation) of the time-dependent values, after the first 16 (roughness) or 36 (fluctuation strength) values at 50 Hz are left out. - The outer and middle ear filter uses the coefficients as printed in Table 1 of the standard, where sottek-hearing-model uses unrounded ones.
For single metrics:
- Sottek Hearing Model fluctuation strength (ECMA-418-2:2025 (4th ed.))
- By default it follows the printed text in three places where sottek-hearing-model decides otherwise: the step limit of Formula (152) (2e-4 Hz, against 0.2), no fundamental required for an assumed order in Section 9.1.8, and machine epsilon for ε0 (against 1e-12). The options
newton_capandrequire_fundamentalgive sottek-hearing-model's choices. - Formula (127) is computed with π instead of the printed 2π in the phase term, and Formula (144) without the printed "− 1", which the code says would shift every rate down one bin.
- By default it follows the printed text in three places where sottek-hearing-model decides otherwise: the step limit of Formula (152) (2e-4 Hz, against 0.2), no fundamental required for an assumed order in Section 9.1.8, and machine epsilon for ε0 (against 1e-12). The options
Notes
- The README describes the gradient as the derivative of the metric wherever the metric is differentiable; the tests check it against central differences and with the Taylor remainder (
tests/test_gradients.py). - The tests run sottek-hearing-model as an oracle: its outputs for five test signals are stored in
tests/fixtures, with the commit they were made with. The fluctuation strength of sottek-hearing-model used there is not in a release yet. - The README reports 22 s forward and 32 s backward for 240 s of stereo audio at 44.1 kHz on an RTX 3090 Ti (10.6 GiB peak memory), for roughness and fluctuation strength together.
Before you rely on it
- Very new (first published in October 2026) and not yet seen to be widely used in the community; no independent verification has been published.
- Single author; one commit so far.
Sources
- https://github.com/agrathwohl/ecma418-torch/blob/master/README.md
- https://github.com/agrathwohl/ecma418-torch/blob/master/LICENSE
- https://github.com/agrathwohl/ecma418-torch/blob/master/pyproject.toml
- https://github.com/agrathwohl/ecma418-torch/blob/master/benchmarks/evidence.md
- https://github.com/agrathwohl/ecma418-torch/blob/master/tests/test_fidelity.py
- https://github.com/agrathwohl/ecma418-torch/blob/master/tests/fixtures/make_oracle_fixtures.py
- https://github.com/agrathwohl/ecma418-torch/blob/master/src/ecma418_torch/fluctuation.py