# MetaSona

> Part of [LISQM](https://zhenxianli.github.io/LISQM/) (List of Implementations of Sound Quality Metrics), a list of open-source implementations of psychoacoustic metrics. Data as of 2026-10-28. Web page: https://zhenxianli.github.io/LISQM/projects/metasona.html

**Newly released project.** First released in September 2026. Not yet seen to be widely used in the community. Check its validation before relying on it.

C library with a typed Python interface and prebuilt wheels, written to make repeated psychoacoustic analysis fast. Covers Zwicker loudness, DIN 45692 sharpness, Daniel–Weber roughness, Aures tonality and ECMA-418-2:2025 loudness, roughness and tonality.

- **Repository:** https://github.com/huaaudio/metasona
- **Documentation:** https://github.com/huaaudio/metasona/tree/main/docs
- **Language:** C, 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:** GPL-3.0-only AND Apache-2.0 AND BSD-3-Clause AND MIT — The combined distribution is GPL-3.0. MetaSona's own code is Apache-2.0; the ECMA-418-2 kernels (from SQAT/RefMap) and the current Aures tonality port are GPL-3.0; SQAT's ISO 532-1 filtering (BSD-3-Clause), SQAT's Daniel & Weber roughness (MIT), MoSQITo data (Apache-2.0) and PocketFFT (BSD-3-Clause) keep their notices.
- **Package:** PyPI `metasona` (https://pypi.org/project/metasona/)
- **Install:** `pip install metasona`
- **Latest release:** v0.2.2 (2026-09)
- **Last commit:** 2026-09-25 (active)
- **GitHub stars:** 1
- **Maintainers:** Jiahua Zhang
- **AI assistance:** disclosed — README and NOTICE state that it was developed with assistance from OpenAI Codex.
- **How to cite:** The project does not say how to cite it. Cite the repository with the version or commit you used.
- **Entry checked:** 2026-10-08

## What it implements

| Metric | Edition | Functions | Status | Validation (as stated) | Notes |
|---|---|---|---|---|---|
| [Zwicker loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-zwicker.html) | [ISO 532-1:2017](https://www.iso.org/standard/63077.html) (stationary and time-varying; also from 28 third-octave levels; since 0.1.0) | `stationary_loudness`, `time_varying_loudness`, `loudness_from_levels` | available | compared with MoSQITo (its source) | — |
| [Sottek Hearing Model loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-ecma-418-2.html) | [ECMA-418-2:2025 (4th ed.)](https://ecma-international.org/wp-content/uploads/ECMA-418-2_4th_edition_june_2025.pdf) (Clause 8 loudness with tonal/noise separation; mono or stereo; since 0.2.0) | `loudness_ecma`, `ecma_tonal_analysis` | available | compared with SQAT (its source) | Adapted from the SQAT/RefMap MATLAB code by Lotinga and Torjussen. |
| [Sharpness](https://zhenxianli.github.io/LISQM/metrics/sharpness.html) | [DIN 45692:2009](https://www.dinmedia.de/en/standard/din-45692/117635111) (from specific loudness; since 0.1.0) | `sharpness_din45692` | available | not stated | — |
| [Roughness (Daniel & Weber)](https://zhenxianli.github.io/LISQM/metrics/roughness-daniel-weber.html) | [Daniel & Weber (1997)](https://zhenxianli.github.io/LISQM/standards.html#ref-daniel-weber-1997) (since 0.1.0) | `roughness_daniel_weber` | available | compared with SQAT (its source) | Follows SQAT revision `e6228b78`, which includes SQAT's September 2026 rewrite but not its later fix to the Terhardt filter bank (PR #77, in SQAT v2.0). |
| [Sottek Hearing Model roughness](https://zhenxianli.github.io/LISQM/metrics/roughness-ecma-418-2.html) | [ECMA-418-2:2025 (4th ed.)](https://ecma-international.org/wp-content/uploads/ECMA-418-2_4th_edition_june_2025.pdf) (mono or stereo; optional entropy weighting not applied; since 0.2.0) | `roughness_ecma` | available | compared with SQAT (its source) | Uses the standard's 20 ms grid and nominal calibration factor, where SQAT uses a slightly adjusted calibration. |
| [Tonality (Aures)](https://zhenxianli.github.io/LISQM/metrics/tonality-aures.html) | [Aures (1985b)](https://zhenxianli.github.io/LISQM/standards.html#ref-aures-1985-euphony) (since 0.1.0) | `tonality_aures` | available | compared with SQAT (its source) | Follows SQAT's September 2026 revision (250 ms Hann windows, 125 ms hop). |
| [Sottek Hearing Model tonality](https://zhenxianli.github.io/LISQM/metrics/tonality-ecma-418-2.html) | [ECMA-418-2:2025 (4th ed.)](https://ecma-international.org/wp-content/uploads/ECMA-418-2_4th_edition_june_2025.pdf) (mono or stereo; since 0.2.0) | `tonality_ecma`, `ecma_tonal_analysis` | available | compared with SQAT (its source) | — |

## 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.

- [Zwicker loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-zwicker.html), ISO 532-1:2017: compared with **[MoSQITo](https://zhenxianli.github.io/LISQM/projects/mosqito.html)** (its source)
  - Ported or adapted from **[MoSQITo](https://zhenxianli.github.io/LISQM/projects/mosqito.html)** and **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)**. It was compared with the code it was ported from, which checks the port only.
  - Model tables taken from MoSQITo were checked element by element; one upper-slope value (0.22) follows the ISO 532-1 reference C table where MoSQITo uses 0.24.
  - The project says that detailed validation and reference comparisons are kept outside the repository; the results are not published. The README says standards conformance has not been established.
- [Sottek Hearing Model loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-ecma-418-2.html), ECMA-418-2:2025 (4th ed.); [Sottek Hearing Model roughness](https://zhenxianli.github.io/LISQM/metrics/roughness-ecma-418-2.html), ECMA-418-2:2025 (4th ed.); [Sottek Hearing Model tonality](https://zhenxianli.github.io/LISQM/metrics/tonality-ecma-418-2.html), ECMA-418-2:2025 (4th ed.): compared with **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)** (its source)
  - Ported or adapted from **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)**. It was compared with the code it was ported from, which checks the port only.
  - The project says that detailed validation and reference comparisons are kept outside the repository; the results are not published.
- [Roughness (Daniel & Weber)](https://zhenxianli.github.io/LISQM/metrics/roughness-daniel-weber.html), Daniel & Weber (1997): compared with **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)** (its source)
  - Ported or adapted from **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)** and **[MoSQITo](https://zhenxianli.github.io/LISQM/projects/mosqito.html)**. It was compared with the code it was ported from, which checks the port only.
  - The project says that detailed validation and reference comparisons are kept outside the repository; the results are not published.
  - The API documentation calls the function experimental and says normative validation remains open.
- [Tonality (Aures)](https://zhenxianli.github.io/LISQM/metrics/tonality-aures.html), Aures (1985b): compared with **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)** (its source)
  - Ported or adapted from **[SQAT](https://zhenxianli.github.io/LISQM/projects/sqat.html)**. It was compared with the code it was ported from, which checks the port only.
  - The project calls its source-based Python comparisons "development checks, not an executed MATLAB/Octave validation"; exact agreement with MATLAB is not established.
  - The results are not published.

Not stated for Sharpness · DIN 45692:2009.

## Before you compare numbers

Implementations of the same metric can give different numbers without either being wrong. Check these choices first.

- Expects calibrated sound pressure in pascals.
- The C functions require 48 kHz input; the Python interface resamples other rates to 48 kHz (SciPy `resample_poly`).
- `time_skip_s` (default 0 s) leaves out the start of the signal from the reported frames; the computation still runs over the whole signal. Time-varying results include every complete frame, labelled at frame centres, which differs from SQAT's handling of the last frame and of time stamps.


## Notes

- First commit and first PyPI release on 2026-09-16.
- Ports SQAT revision `e6228b78` (2026-09-15), which includes the Daniel & Weber rewrite (#65) and the Aures tonality fixes (#66–#73) but not PR #77 (2026-09-17, in SQAT v2.0), a fix to the Terhardt filter bank that Daniel & Weber roughness uses. Model data come from MoSQITo; differences to both are listed in [THIRD_PARTY.md](https://github.com/huaaudio/metasona/blob/main/THIRD_PARTY.md).
- The README reports speed-ups over MoSQITo 1.2.1 (e.g. 73× for time-varying loudness on its benchmark signal).

## Before you rely on it

- Very new (first released in September 2026) and not yet seen to be widely used in the community; no independent verification has been published.
- The README calls the current version experimental, particularly roughness and tonality, and says standards conformance has not been established.
- Comparisons with SQAT and MoSQITo are described as kept outside the package repository, and the third-party notes say exact agreement with the MATLAB code is not established.

## Sources

- https://github.com/huaaudio/metasona/blob/main/README.md
- https://github.com/huaaudio/metasona/blob/main/THIRD_PARTY.md
- https://github.com/huaaudio/metasona/blob/main/NOTICE
- https://pypi.org/project/metasona/
- https://github.com/huaaudio/metasona/blob/main/python/metasona/_abi.py
- https://github.com/huaaudio/metasona/blob/main/docs/c-api.md
- https://github.com/huaaudio/metasona/blob/main/docs/python-api.md
