Skip to main content

hrtfpykit

Python 3.12+ PyPI package Docs Sphinx Furo CI/CD workflow SOFA HRTF HRIR License GPL 3.0 only

What is hrtfpykit?

hrtfpykit is a Python library for complete Head Related Transfer Function (HRTF) workflows, from SOFA file inspection and acoustic processing to visualization, comparison, and reproducible dataset pipelines construction. It brings time/frequency domain handling, transformations, metrics, plots, and dataset pipelines into one workflow for research, HRTF individualization, and deep learning experiments.

Why hrtfpykit?

HRTF research often requires more than reading one SOFA file. If you have worked with HRTFs, you have probably met the usual ritual: searching for public datasets, discovering that every measurement setup has its own personality, adapting HRIR arrays to different dataset layouts, and moving between scripts, platforms, and tools with different assumptions. Datasets such as ARI, HUTUBS, and SONICOM made this work much more accessible, especially compared with the pre SOFA days of CSV files, spreadsheets, and heroic column name interpretation. Even today, the workflow can still become fragmented very quickly.

hrtfpykit was created to make those steps part of a clearer workflow. It gives researchers a way to work with HRTFs without losing the connection between the file, the acoustic representation, and the experiment.

What does hrtfpykit enable?

hrtfpykit can enable complete HRTF workflows, from file inspection to dataset construction. It is designed for users who need to understand, process, visualize, compare, and reuse HRTF data across research and deep learning tasks.

  • Open, inspect, validate, edit, clone, and save SOFA files.
  • Load HRTFs as acoustic objects with time domain and frequency domain views.
  • Select source positions, ears, samples, and frequency bins.
  • Modify HRTFs through transformations, domain conversions, and acoustic processing steps.
  • Generate plots to inspect spectral cues, magnitude, amplitude, ITD, LSD, and differences between HRTFs with comparison plots, which is especially useful for HRTF individualization.
  • Download selected resources, including HRTF SOFA files, anthropometry, metadata, and meshes when available from public HRTF datasets like ARI, SONICOM, or HUTUBS.
  • Combine HRTFs with subject data such as anthropometry, metadata, meshes, and images.
  • Create map-style dataset pipelines for training multimodal deep learning models.
  • Build deep learning experiments for HRTF individualization and related tasks.

Architecture

hrtfpykit is organized around four public API entry points. The SOFA layer handles file structure, the HRTF layer builds the acoustic object, the plots layer visualizes HRTF data, and the datasets layer turns public HRTF resources into training and analysis samples.

  • hrtfpykit.sofa: open, inspect, validate, edit, clone, and save SOFA files as structured Python objects.
  • hrtfpykit.hrtf: load SOFA files as HRTF objects with IR data, TF data, source positions, transforms, metrics, and spherical harmonics.
  • hrtfpykit.plots: visualize HRTF objects through spectral cues, source grids, binaural cues, spherical harmonic reconstructions, and comparison plots.
  • hrtfpykit.datasets: build map-style public HRTF dataset pipelines with explicit inputs, targets, variants, splits, subject resources, custom resources, and batching utilities.

Guides

  • Quick Start: first working examples for SOFA files, HRTF objects, plots, and datasets.
  • Tutorials: guided notebook workflows for learning hrtfpykit step by step.

Installation

hrtfpykit requires Python 3.12 or newer.

pip install hrtfpykit

For local installation from source:

git clone https://github.com/ArielAlvarez-Martinez/hrtfpykit.git
cd hrtfpykit
pip install .

For local development from source:

git clone https://github.com/ArielAlvarez-Martinez/hrtfpykit.git
cd hrtfpykit
pip install -e ".[test,docs]"

License

hrtfpykit is distributed under the GPL 3.0 only license. See LICENSE for details.

Metadata

Release files for hrtfpykit 0.2.0

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

Source distribution (sdist)

Source distribution for hrtfpykit 0.2.0
File Size Uploaded
hrtfpykit-0.2.0.tar.gz 883.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hrtfpykit 0.2.0
File Interpreter ABI Platform
hrtfpykit-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / hrtfpykit-0.2.0.tar.gz

Download URL hrtfpykit-0.2.0.tar.gz
Size 883.1 kB
Tags Source
SHA-256 checksum
How to use checksums
437de57deb7d0ed8ab63446123ce3abbdb8bd5d37741e4344ae0a233b373195a
BLAKE2b-256 checksum
How to use checksums
00950905d2833966feade611e1015d4121729c636789e623170554ce0ab56b9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 12, 2026.

Transparency log

Release files / hrtfpykit-0.2.0-py3-none-any.whl

Download URL hrtfpykit-0.2.0-py3-none-any.whl
Size 882.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a9f91c04346488e83b63397847138cdfe480813caf3b88286902fddc0b4f7a5
BLAKE2b-256 checksum
How to use checksums
73d78f89bbdf564b205ec328000bb5f8b94b57a743e1d6035e7d25024cb2f773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

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