sottek-hearing-model
Python implementation of the ECMA-418-2:2025 (4th edition) Sottek Hearing Model metrics: loudness and roughness (with binaural combination), tonality (per channel), and fluctuation strength on the main branch. Translated from the MATLAB code used in SQAT and the RefMap project.
| Repository | https://github.com/mlotinga/sottek-hearing-model |
|---|---|
| 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 | established Described in a publication, used by others, or written by the authors of the model, with more than a year of history. A very good implementation. |
| Licence | GPL-3.0-only The LICENSE file has always been GPL-3.0 and the project metadata was changed to GPL-3.0-only on 2026-08-31; the metadata of the current PyPI release (0.1.14) still says AGPL-3.0-only. |
| Package | PyPI sottek-hearing-model |
| Install | pip install sottek-hearing-model |
| Latest release | v0.1.14 (2026-03) |
| Last commit | 2026-09-18 active |
| GitHub stars | 23 |
| Maintainers | Mike Lotinga |
| AI assistance | not stated |
| Paper | Lotinga, M. J. B., Torjussen, M., & Felix Greco, G. (2025). Verified implementations of the Sottek psychoacoustic Hearing Model standardised sound quality metrics (ECMA-418-2 loudness, tonality and roughness). Forum Acusticum / Euronoise 2025, Málaga. https://doi.org/10.61782/fa.2025.0951 |
| How to cite | The README asks for the paper above, which published the MATLAB code the package was translated from, and gives a BibTeX entry for it. Name the version or commit you used. |
| Entry checked | 8 October 2026 |
What it implements
| Metric | Edition | Functions | Validation (as stated) | Notes |
|---|---|---|---|---|
| Sottek Hearing Model loudness | ECMA-418-2:2025 (4th ed.) mono or stereo, with combined binaural output; since 0.1.9 | shm_loudness_ecma, shm_loudness_ecma_from_comp | standard or paper data (calibration signals and one recording) also compared with ArtemiS SUITE (HEAD acoustics) | — |
| Sottek Hearing Model roughness | ECMA-418-2:2025 (4th ed.) with combined binaural output; since 0.1.9 | shm_roughness_ecma | standard or paper data (reference signal and one recording) also compared with ArtemiS SUITE (HEAD acoustics) | — |
| Sottek Hearing Model fluctuation strength | ECMA-418-2:2025 (4th ed.) needs at least 1.37 s of signal; binaural option | shm_fluctuation_ecma | compared with refmap-psychoacoustics (its source) and ArtemiS SUITE (HEAD acoustics) | unreleased Merged on 2026-09-18. Five departures from the printed text are documented (four equations and one interpretation of Section 9.1.8). |
| Sottek Hearing Model tonality | ECMA-418-2:2025 (4th ed.) since 0.1.9 | shm_tonality_ecma | standard or paper data (reference signal and one recording) also compared with ArtemiS SUITE (HEAD acoustics) | Optional experimental tonal-annoyance weighting (Sottek & Becker, 2019) since 0.1.14. |
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.
Checked by the maintainer of LISQM: In personal use, Zhenxian LI found its results in very good agreement with those of HEAD acoustics ArtemiS SUITE. This is a personal check, not a published comparison.
- Sottek Hearing Model loudness · ECMA-418-2:2025 (4th ed.)
standard or paper data (calibration signals and one recording) also compared with ArtemiS SUITE (HEAD acoustics)
Ported or adapted from refmap-psychoacoustics (the author's own code).
- Unit tests check the standard's calibration signals (1 kHz, 40 dB gives 1 sone_HMS).
- RefMap's verification compared the Python code, before it became this package, and the MATLAB original with HEAD acoustics ArtemiS v17.1 for the two calibration signals and a 30 s binaural street recording.
- Sottek Hearing Model roughness · ECMA-418-2:2025 (4th ed.)
standard or paper data (reference signal and one recording) also compared with ArtemiS SUITE (HEAD acoustics)
Ported or adapted from refmap-psychoacoustics (the author's own code).
- Unit tests check the standard's reference signal, which should give 1 asper_HMS, at 48 and 44.1 kHz.
- RefMap's verification against ArtemiS v17.1, as for loudness.
- Sottek Hearing Model fluctuation strength · ECMA-418-2:2025 (4th ed.)
compared with refmap-psychoacoustics (its source) and ArtemiS SUITE (HEAD acoustics)
Ported or adapted from refmap-psychoacoustics (the author's own code). It was compared with the code it was ported from, which checks the port only.
- A draft report (18 September 2026) compares it with
acousticSHMFluctuation.m, the MATLAB code it was translated from: equal to floating-point precision on the synthetic signals and on one channel of each recording, with a small difference in a short time window on the other channel. - Against HEAD acoustics ArtemiS SUITE v17: 0.994 against 1.003 vacil_HMS for the calibration signal (the standard's target is 1.0), −8 % to +12 % for the overall values of three binaural recordings, and correlations of 0.91 to 0.998 for the time-dependent values.
- A draft report (18 September 2026) compares it with
- Sottek Hearing Model tonality · ECMA-418-2:2025 (4th ed.)
standard or paper data (reference signal and one recording) also compared with ArtemiS SUITE (HEAD acoustics)
Ported or adapted from refmap-psychoacoustics (the author's own code).
- Unit tests check the standard's reference signal, which should give 1 tu_HMS, at 48 and 44.1 kHz.
- RefMap's verification against ArtemiS v17.1, as for loudness.
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.
- Overall roughness and fluctuation strength are 90th percentiles computed with NumPy (linear interpolation, Hyndman–Fan type 7). The MATLAB code it was translated from uses
prctile, which interpolates differently, so single values can differ slightly from RefMap and SQAT.
Notes
- The paper verifies the MATLAB implementations of the 3rd edition, from which this package was translated; it does not cover the Python package itself.
- Maintained by one person at the University of Salford (RefMap project). Requires Python 3.11 or newer.
- pySQAT calls this package for its ECMA-418-2 metrics.
Before you rely on it
- Fluctuation strength is only on the main branch (not on PyPI yet) and its verification report is marked as a draft.
- Versions up to 0.1.13 are affected by an empty-array bug fixed in 0.1.14 (#9).
Sources
- https://github.com/mlotinga/sottek-hearing-model/blob/main/README.md
- https://github.com/mlotinga/sottek-hearing-model/blob/main/LICENSE
- https://github.com/mlotinga/sottek-hearing-model/blob/main/docs/validation/fluctuation_strength_verification.md
- https://pypi.org/project/sottek-hearing-model/
- https://github.com/mlotinga/sottek-hearing-model/issues/9
- https://github.com/mlotinga/sottek-hearing-model/tree/main/tests
- https://github.com/acoustics-code-salford/refmap-psychoacoustics/blob/main/validation/ECMA-418-2/README.md