Skip to main content

p56-asl

p56-asl is a Python library and CLI for measuring active speech level (ASL) according to ITU-T Rec. P.56 — the standard used in telecom voice-quality testing. It combines a high-performance Rust core with Python bindings, giving you both a programmatic API and a scriptable command-line tool.

Unlike most P.56 implementations, this one is bit-exact with the ITU reference C code (validated against G.191 test vectors) while remaining MIT-licensed and pip-installable.

PyPI License CI


Features

  • Bit-Exact P.56 Compliance: Validated against ITU-T G.191 reference test vectors — the same algorithm telecom labs use.
  • Extended Measurement Mode: Measures above full-scale signals (up to +40 dB) with automatic calibration — the standard P.56 cannot do this.
  • Three Interfaces: Python library, CLI tool, and direct Rust API — use whatever fits your pipeline.
  • High Performance: Rust core handles multi-gigabyte WAV files without loading them fully into memory.
  • Flexible I/O: Reads any format soundfile supports (WAV, FLAC, OGG) and resamples to 16 kHz automatically when needed.

Installation

pip install p56-asl

Requires Python 3.13+.

Quick Start

Python API

from p56_asl import ActiveSpeechLevelMeter
import soundfile as sf

# Read a mono WAV file
samples, sr = sf.read("input.wav", dtype="float32")

# Measure active speech level
meter = ActiveSpeechLevelMeter(sample_rate=sr)
meter.process_block(samples)
result = meter.finish()

print(f"ASL: {result.active_speech_level_db:.2f} dB")
print(f"Activity factor: {result.activity_factor:.2%}")

CLI

# Measure a WAV file
p56-asl measure input.wav

# JSON output with options
p56-asl measure input.wav --pre-filter nb --format json

# Calibrate (amplify by +3.01 dB)
p56-asl calibrate input.wav 3.01 output.wav

See the CLI reference for all options.

Documentation

Full documentation with API reference, architecture decisions, and the P.56 method explanation is available at:

→ jr2804.github.io/p56-asl

Development

git clone https://github.com/jr2804/p56-asl.git
cd p56-asl
mise dev          # install tools + deps
mise test         # run test suite
mise lint         # ruff + ty + codespell
mise docs-serve   # live preview at http://localhost:8000

Pre-commit hooks, contributing guidelines, and the full tech stack are documented in the Contributing guide.

License

MIT — see the license page for details.

Metadata

Release files for p56-asl 2026.10.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for p56-asl 2026.10.1
File Size Uploaded Provenance Actions
p56_asl-2026.10.1.tar.gz 2.7 MB With provenance Details for p56_asl-2026.10.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for p56-asl 2026.10.1
File Actions
p56_asl-2026.10.1-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for p56_asl-2026.10.1-cp314-cp314t-win_amd64.whl
p56_asl-2026.10.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details for p56_asl-2026.10.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
p56_asl-2026.10.1-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for p56_asl-2026.10.1-cp314-cp314t-macosx_11_0_arm64.whl
p56_asl-2026.10.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for p56_asl-2026.10.1-cp314-cp314-win_amd64.whl
p56_asl-2026.10.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details for p56_asl-2026.10.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
p56_asl-2026.10.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details for p56_asl-2026.10.1-cp314-cp314-macosx_11_0_arm64.whl
p56_asl-2026.10.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for p56_asl-2026.10.1-cp313-cp313-win_amd64.whl
p56_asl-2026.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for p56_asl-2026.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
p56_asl-2026.10.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for p56_asl-2026.10.1-cp313-cp313-macosx_11_0_arm64.whl

Total release size: 8.7 MB

Release files / p56_asl-2026.10.1.tar.gz

Download URL p56_asl-2026.10.1.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
d6e360606e3989c0aa9411448a104d4730b24b28aca4e57770a81d0da65e3551
BLAKE2b-256 checksum
How to use checksums
0b4a61852ba29711ecf9e3126e777254181d6db8ed0b193dc9858cefdd67410b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp314-cp314t-win_amd64.whl

Download URL p56_asl-2026.10.1-cp314-cp314t-win_amd64.whl
Size 674.4 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
7b3cf2fcb780337999b5ccd942afcb26c95d1179109bed502dd72b0c4681d472
BLAKE2b-256 checksum
How to use checksums
798ff9624d40c929f4477b2625e980cdd06d7b93d442f6bb5b40106107746221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL p56_asl-2026.10.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 795.9 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
72c86d8ac318b1f7a1e390b77dfe14d1a9e695d97a83fe99d6c86b00ae7f220c
BLAKE2b-256 checksum
How to use checksums
74b1a4fd7b87a8930414d1fa400620ce736660c8237532f363cb4fcfdc1429ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp314-cp314t-macosx_11_0_arm64.whl

Download URL p56_asl-2026.10.1-cp314-cp314t-macosx_11_0_arm64.whl
Size 536.9 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9d36e8db94cc1f737be654f942573a51f71c1e017b09ea32800ca61825f5859b
BLAKE2b-256 checksum
How to use checksums
15eed49a9c385f77804af9a192f0013ffca7cca17a429c4c2f46378ef0a5ebb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp314-cp314-win_amd64.whl

Download URL p56_asl-2026.10.1-cp314-cp314-win_amd64.whl
Size 673.5 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
470ea1edb2d190e83a3425992f37a2d9047c9be5e3477858d155a14920948e87
BLAKE2b-256 checksum
How to use checksums
5da5dd47c30bb4af1feed792bbd264155ee509918494f77cd5da9573d4617688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL p56_asl-2026.10.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 792.8 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
32c959440ecb95aaab936170ea4a86182191847b4bfb062d9143f018a07ed23e
BLAKE2b-256 checksum
How to use checksums
c4225bd1ff647a9b7227492189b3efe0e1bea84e141ddc857886f158bdd34176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL p56_asl-2026.10.1-cp314-cp314-macosx_11_0_arm64.whl
Size 537.6 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
70dacd1e60b7e9ff28430715d05968cf6a7455c5c526dcd61c0b68b0aa29dc36
BLAKE2b-256 checksum
How to use checksums
aa092eac30b546b436e1919325389f76780b5a16cdff99a1d7e37d918c430b8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp313-cp313-win_amd64.whl

Download URL p56_asl-2026.10.1-cp313-cp313-win_amd64.whl
Size 674.5 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
63d189ef28b3c03d453b06cd091366d1b681c8a398e024bc1436e555e314f7e1
BLAKE2b-256 checksum
How to use checksums
93c5e27ce2817cb49f6fe03ec9b4ffc05a8a4d37a57f1e4aec0e9b18ee17e45e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL p56_asl-2026.10.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 794.6 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
abc555345268e7ff57b6275d18e47d17b829dd567515d1bedd2b11753dea5b95
BLAKE2b-256 checksum
How to use checksums
a12d5d666abc5b30f5c19971ea85ee69693011fb7a78784c2c09254af2857ee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / p56_asl-2026.10.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL p56_asl-2026.10.1-cp313-cp313-macosx_11_0_arm64.whl
Size 537.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7e385c42bc6a8134cc7695ccdd25ea98b86b0b5391187f45d1f5c3bcbcfdd822
BLAKE2b-256 checksum
How to use checksums
616835cf84a91a6d2244625eaf0dc03dce37ca1a6a9925b13acfdd522ce5f8fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for p56-asl 2026.10.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 10 files in this release have been uploaded with provenance metadata.

Select from 10 files

Attestation for p56_asl-2026.10.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2026.10.1 This release

10 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page