Skip to content

phonometry

Acoustic measurement, analysis and prediction in Python. Every metric is implemented from the text of its standard, and CI checks it against that standard's own tolerance tables and worked examples on every pull request.
278standards referenced, across 53 domains
506figures, each in light and dark, English and Spanish
32normative PDF fiches rendered by .report()

What this is

phonometry is a Python library for acoustic measurement, analysis and prediction. You give it a signal, a measured spectrum or a set of geometrical and material inputs; it gives you the quantity the standard defines, with the intermediate terms still visible.

Every result is a typed, frozen dataclass. It carries the inputs it was computed from, it draws its own figure with a one-line .plot() in English or Spanish, and where a standard defines a reporting format it renders a one-page PDF fiche with .report().

It is written and maintained by one person, published under the MIT licence on PyPI, archived with a DOI on Zenodo, and currently at version 3.2.0. It needs Python 3.13 with NumPy and SciPy; matplotlib, numba and reportlab are optional extras.

Who it is for

  • Consultants and test laboratories who need the number a standard defines and the terms behind it, in a form that can go into a report.
  • Researchers who need a readable, citable reference implementation rather than a black box, and who need to see which clause each formula came from.
  • Audio, firmware and product engineers who need class 1 weighting and filters, distortion, loudness and speech metrics inside their own test rigs.
  • Students and teachers, since every guide states the standard, the formula and the assumptions before the code.

What it is not

  • Not a certified instrument. The conformance report is the library checking its own output against values published in the standards, not an accredited third-party calibration. Legal measurements still need type-approved hardware.
  • Not a data-acquisition system. It processes arrays and files you supply; it does not talk to sound cards, microphones or analysers.
  • Not a complete implementation of every standard it cites. Each guide states which clauses, methods and annexes are covered, and which are not.

What it looks like in use

Two things the library does that are hard to claim and easy to show: the result of an analysis draws itself, and where a standard prescribes a reporting layout, the same result renders that layout as a PDF.

An analysis, and the figure it draws

One-third-octave band levels of a two-tone signal, per IEC 61260-1 band edges, with the raw power spectral density behind them. The figure below is the one committed in the documentation, not a mock-up.

import numpy as np
from phonometry import metrology
fs = 48_000
t = np.linspace(0, 1, fs, endpoint=False)
signal = np.sin(2 * np.pi * 100 * t) + np.sin(2 * np.pi * 1000 * t)
spl, freq = metrology.octave_filter(signal, fs=fs, fraction=3)
One-third-octave spectrum of a two-tone signal, with the raw power spectral density in the backgroundOne-third-octave spectrum of a two-tone signal, with the raw power spectral density in the background
From the Getting Started guide: 33 bands from 12.6 Hz to 20 kHz, peaking at 100 Hz and 1 kHz.

A rating, and the fiche it renders

The weighted airborne rating of ISO 717-1 from a measured 16-band spectrum, rendered in the layout an accredited report uses: metadata header, band table, measured curve against the shifted reference, the boxed single-number result and the verdict against the requirement.

from phonometry import building, ReportMetadata
R = [20.4, 16.3, 17.7, 22.6, 22.4, 22.7, 24.8, 26.6,
28.0, 30.5, 31.8, 32.5, 33.4, 33.0, 31.0, 25.5]
meta = ReportMetadata(
specimen="200 mm reinforced-concrete wall",
laboratory="Phonometry Reference Laboratory",
report_id="PHN-2026-0042",
requirement=42.0, # adds the verdict row
)
building.weighted_rating(R).report("Rw_fiche.pdf", metadata=meta)
Airborne ISO 717-1 example report (PDF)

One-page airborne sound insulation fiche: a metadata header, the one-third-octave R table beside the measured-versus-shifted-reference plot, the boxed Rw (C; Ctr) single-number result and a PASS verdict against the requirement.

Download the report (PDF)

Airborne rating fiche (WeightedRatingResult.report), Rw (C; Ctr).

What it covers

Nine areas, 66 guides, 120 API reference pages. Each row links to the area overview; the designations are the standards actually implemented there, not a reading list.

AreaStandards implemented
Core signal analysisFilter banks, weighting, levels, spectra, calibration and uncertainty.IEC 61260-1ANSI S1.11IEC 61672-1ISO 7196IEC 61252ISO 1996-1IEC 60942ISO 18233GUM
Hearing and perceptionLoudness, sound quality, speech intelligibility, hearing and exposure.ISO 532-1/-2/-3ECMA-418-1/-2ISO 226DIN 45692IEC 60268-16ANSI S3.5ISO 7029ISO 1999ISO 9612
Rooms and buildingsRoom parameters, background noise, field and laboratory insulation, prediction.ISO 3382-1/-2/-3ISO 16283-1/-2/-3ISO 10140ISO 717-1/-2EN 12354-1…-6ISO 12999-1ISO 10052ANSI/ASA S12.2
Materials and surfacesAbsorption, airflow resistance, impedance tube, porous models, scattering.ISO 354ISO 11654ISO 10534-2ISO 9053ISO 17497-1/-2ISO 13472EN 29052
Vibration and structure-borne soundMobility and FRFs, isolators, radiated power, junctions, human vibration.ISO 7626ISO 10846ISO/TS 7849EN 15657EN 12354-5ISO 2631-1/-5ISO 5349ISO 8041
Environment and transportOutdoor propagation, barriers, refraction, aircraft, rotorcraft and wind turbines.ISO 9613-1/-2ISO 1996-1/-2ISO/PAS 1996-3NT ACOU 112ICAO Annex 16IEC 61265SAE ARP 5534ECAC Doc 29/32IEC 61400-11
Underwater acousticsLevels re 1 µPa, ship radiated noise, pile driving, ambient noise, transmission loss.ISO 18405ISO 17208-1/-2ISO 18406JOMOPANS-ECHO
Sources and devicesSound power, intensity, emission declarations, electroacoustics, programme loudness.ISO 3741ISO 3744/3746ISO 3745ISO 9614-1/-2/-3IEC 61043ISO 4871IEC 60268-3/-4/-5ITU-R BS.1770-5EBU R 128
Wave simulationA deterministic 2D FDTD solver, validated against analytic oracles rather than a standard.no governing standard

Starting from zero

Three steps, in order. The first two take a few minutes; the third is the part you keep coming back to.

  1. Install it

    Python 3.13 or newer. The base install pulls in NumPy and SciPy; the full extra adds plotting, the faster impulse ballistics and PDF fiche rendering.

    pip install phonometry[full]
    Installation options
  2. Run one analysis end to end

    Getting Started walks the whole processing chain once, on a synthetic signal and then on a WAV file: calibration, frequency weighting, the filter bank, time weighting and the levels that come out.

    Getting Started
  3. Go to your own domain

    Each guide opens with the standard it implements, the quantities it defines and the assumptions, then the code, then the figure. When you need the exact signature, the API reference has one page per module.

    API reference

Last updated:

Created and maintained by· GitHub· PyPI· All projects