Skip to main content

IEC 61672-1 Sound Level Meter

Project description

soundlevelmeter

An IEC 61672-1 and IEC 61260-1 compliant sound level meter in Python. Measures LAeq, LCeq, LZeq, LASmax, LAFmax, octave-band levels (1/1, 1/3, 1/6, …), sound exposure levels (LE), and more — from WAV files, a numpy array or a live microphone.

Features

  • Broadband metrics — A/C/Z frequency weighting; Fast/Slow/Impulse time weighting; Leq, max, min, sound exposure level, and moving-window variants.
  • Octave-band analysis (RTA) — arbitrary N/M-octave filter banks (1/1, 1/3, 1/6, …) per IEC 61260-1.
  • Any source — WAV files, an in-memory NumPy array or a live audio device.
  • Standards-based — filters and weightings verified against the IEC 61672-1 / 61260-1 conformance limits (scripts/conformance_report.py).
  • Three ways to drive it — a command-line tool, an interactive REPL, and a Python API.

Installation

git clone https://github.com/ninoblumer/python-soundlevelmeter
cd python-soundlevelmeter
python -m venv venv
source venv/bin/activate      # macOS / Linux
# venv\Scripts\activate       # Windows
pip install -r requirements.txt

To use slm as a shell command instead, you can install this tool directly. For example with pip install --user git+https://github.com/ninoblumer/python-soundlevelmeter.git@main

Quickstart

Measure a recorded WAV file:

# calibrate from a recording of a calibration tone
$ python -m slm --file calibration.wav -- calibrate
Sensitivity: 17.68 mV  |  -35.05 dBV
$ python -m slm --file recording.wav --sensitivity-dbv -35.05 --measure LAeq LAFmax LCeq LZeq:bands:63-8000

Broadband results land in output/measurement_report.csv (and a per-dt _log.csv); per-band results in output/measurement_rta_report.csv. See Getting started for live input, the REPL, sensitivity flags, and every option.

Documentation

Full documentation lives in docs/:

Guide What it covers
Getting started CLI usage, live input, the generator, the interactive REPL
Metric name syntax How to name quantities (LAeq, LAFmax_dt, LZeq:bands:63-8000, …)
Calibration Deriving controller sensitivity from a calibrator tone
Signal conditioning The XL2-style input filter (--signal-conditioning)
Configuration TOML config schema for reproducible runs
Python API High-, mid-, and low-level library entry points
Architecture Controller → Engine → Bus → plugins → meters → Reporter
Running the tests pytest, slow tests, the conformance margin report
Real-time load benchmark Measuring CPU headroom against the real-time budget

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for full details and NOTICE for third-party attributions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soundlevelmeter-1.0.0.tar.gz (91.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soundlevelmeter-1.0.0-py3-none-any.whl (90.8 kB view details)

Uploaded Python 3

File details

Details for the file soundlevelmeter-1.0.0.tar.gz.

File metadata

  • Download URL: soundlevelmeter-1.0.0.tar.gz
  • Upload date:
  • Size: 91.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for soundlevelmeter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9fbad5ce62f285fbabb59561388ab840d52adb10d157147dfc5f3584dbe1e404
MD5 2559ad52ca7fa180704e234dfc05531d
BLAKE2b-256 47de2ea05a6a50cce4f95e01cfee883d008e9657b01c223aff0c1b06b320c5a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for soundlevelmeter-1.0.0.tar.gz:

Publisher: pypi-publish.yml on ninoblumer/python-soundlevelmeter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file soundlevelmeter-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for soundlevelmeter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0ddeb0d988c8016a365655b5c8062ad9fb80990c7d7bc702d6e731b9aa8900
MD5 88501e513e41b457d7cffcdd9cb3bfb1
BLAKE2b-256 45abcc32bddb97238ad7d779701c9301973122772cd29f49801c43ec46548f7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for soundlevelmeter-1.0.0-py3-none-any.whl:

Publisher: pypi-publish.yml on ninoblumer/python-soundlevelmeter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page