Skip to main content

praatfan-rust

Fast Rust implementation of Praat's core acoustic analysis algorithms, with Python bindings. MIT-licensed.

praatfan_rust is the compiled backend for praatfan — a clean-room reimplementation of Praat's acoustic analysis, written from published papers and Praat's public documentation rather than from Praat's GPL source, so it can be used under a permissive licence.

pip install praatfan-rust

It can be used directly, or installed alongside praatfan and selected automatically through that package's unified API.

What it computes

Analysis Methods
Pitch (F0) autocorrelation, cross-correlation
Formants Burg LPC, single and batched over ceilings
Intensity —
Harmonicity (HNR) autocorrelation, cross-correlation
Spectrum FFT, plus centre of gravity / spread / skewness / kurtosis
Spectrogram STFT

Audio is read via Symphonia (WAV, FLAC, MP3, OGG, AIFF, CAF and more). NIST SPHERE, including shorten-compressed, decodes through a statically linked desphere — no extra dependency and no external binary. Mono only; multi-channel files require an explicit channel selection.

Example

import praatfan_rust

sound = praatfan_rust.Sound("audio.wav")

pitch = sound.to_pitch_ac(time_step=0.01, pitch_floor=75.0, pitch_ceiling=600.0)
formant = sound.to_formant_burg(time_step=0.0, max_number_of_formants=5,
                                maximum_formant=5500.0)
harmonicity = sound.to_harmonicity_ac(0.01, 75.0, 0.1, 4.5)

Reading harmonicity values

Two entries in an HNR contour are markers rather than measurements:

  • -200 — no periodicity was found (silence, DC, unvoiced).
  • NaN — the correlation is not resolvable from 1, so no HNR can be derived.

Filter both before averaging, e.g. v[np.isfinite(v) & (v > -200)]. The autocorrelation method also requires periods_per_window >= 3.0; below that the estimator is ill-conditioned and emits a FutureWarning (this will become an error in a future release). 4.5 is the standard value for the AC method; 1.0 is the CC default, not an AC one.

Also available

  • WebAssembly — the same core runs in the browser via wasm-pack.
  • praatfan-open-pipe — a JSON-over-stdin/stdout binary used by the R package, so R and shell callers pay the audio load once per file.

Licence

MIT.

Metadata

Release files for praatfan-rust 0.1.10

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

Source distribution (sdist)

Source distribution for praatfan-rust 0.1.10
File Size Uploaded Provenance
praatfan_rust-0.1.10.tar.gz 103.4 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for praatfan-rust 0.1.10
File
praatfan_rust-0.1.10-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
praatfan_rust-0.1.10-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
praatfan_rust-0.1.10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
praatfan_rust-0.1.10-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
praatfan_rust-0.1.10-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
praatfan_rust-0.1.10-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 9.5 MB

Release files / praatfan_rust-0.1.10.tar.gz

Download URL praatfan_rust-0.1.10.tar.gz
Size 103.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a41bceff9a3447e692068fff22c7eb1eb1e296bae4d441199e5d7df6f1717198
BLAKE2b-256 checksum
How to use checksums
534d2c60c57b29813b978da07dba64560a62d47952bde5e3a0f7323c08b9c9e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / praatfan_rust-0.1.10-cp39-abi3-win_arm64.whl

Download URL praatfan_rust-0.1.10-cp39-abi3-win_arm64.whl
Size 1.2 MB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
02d0876ffd4dda3ee925665dee2dd48897f335b39437f9b199f9cc9464cf3a3d
BLAKE2b-256 checksum
How to use checksums
243de9cafc7cd168a3522f710ec093be210a713563e9dfc0743a7dd413d8ed77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / praatfan_rust-0.1.10-cp39-abi3-win_amd64.whl

Download URL praatfan_rust-0.1.10-cp39-abi3-win_amd64.whl
Size 1.7 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c42d6f976b3c84758f4c62a29ec1de59e490e6f1e301a6297c401be7cd8d2e80
BLAKE2b-256 checksum
How to use checksums
239de190ec20d87903466133a7b54c88891998f859c78ba2fff64af6e30e0130
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / praatfan_rust-0.1.10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL praatfan_rust-0.1.10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.0 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4475881af8a68b84430be23b4644cf46285c43eab26ebee3c95e36d452ec4002
BLAKE2b-256 checksum
How to use checksums
8f182eebceab4000fc43961c294d49d3fe4b315df1f8a11a81ea873a2b33d6d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / praatfan_rust-0.1.10-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL praatfan_rust-0.1.10-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.5 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ce9e3a8a4fb3ece40eaffe0a005b00bd2c96202f9d1d3aff9f02f36a0bf90ad2
BLAKE2b-256 checksum
How to use checksums
191101ab728d11f0f1171ee6a2ecccc007cd6652d82421128e42a45958222ca0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / praatfan_rust-0.1.10-cp39-abi3-macosx_11_0_arm64.whl

Download URL praatfan_rust-0.1.10-cp39-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
56fc3af7e3832deb04cd485c3026512df80820e05011f547071a0ef1d9537d9d
BLAKE2b-256 checksum
How to use checksums
7b9605d5af05ae93852bde9dcfee3d50aed54411c70c176f9096e7c858b0e41a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / praatfan_rust-0.1.10-cp39-abi3-macosx_10_12_x86_64.whl

Download URL praatfan_rust-0.1.10-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.6 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3ac574c08e1fc79fd515dd41b6b1c73e1e832bf997f72d773169358d7ef2e0a7
BLAKE2b-256 checksum
How to use checksums
9c99b0f5397928ea24b87394d3cf30ea14d6afb5e78c4df52f8040212f501fd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for praatfan-rust 0.1.10

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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