Spatial Audio Metrics (SAM) Toolbox
- Spatial Audio Metrics (SAM) Toolbox is an open-source Python framework designed for standardized HRTF analysis, comparison, and visualization across measured and synthetic datasets.
- The toolbox integrates the extended SONICOM HRTF dataset to facilitate rapid, reproducible evaluation using key metrics such as spectral distortion, ITD, and ILD.
- SAM supports iterative research in HRTF synthesis and machine-learning applications by providing a unified infrastructure for cross-subject and cross-method spatial audio analysis.
The Spatial Audio Metrics (SAM) Toolbox is an open-source Python package for spatial audio metrics, introduced alongside the extended SONICOM HRTF dataset as the analysis and visualization layer for HRTF research. It was created to make HRTF analysis and visual comparison easier, faster, and more standardized, and is framed as support for a standardized, reproducible evaluation methodology that can rapidly compare HRTFs numerically and visually from different subjects and synthesis methods (Poole et al., 7 Jul 2025).
1. Definition and scope
SAM is described as a Python toolbox for spatial audio metrics, with an emphasis on HRTF analysis. It is not merely a file reader or dataset wrapper; rather, it is intended as a robust and extensible framework for computing key spatial audio parameters, comparing HRTFs across subjects or methods, and visualizing those comparisons in a way that supports research and development workflows (Poole et al., 7 Jul 2025).
The toolbox is presented in direct relation to the extended SONICOM HRTF dataset. In that pairing, the dataset supplies a much larger body of measured and synthetic HRTFs plus associated scan data, while SAM provides the analysis and visualization layer needed to inspect, compare, and validate those HRTFs in a reproducible way. The paper further characterizes the package as open-source, publicly available, and under continuous development, with code hosted at https://github.com/Katarina-Poole/Spatial-Audio-Metrics (Poole et al., 7 Jul 2025).
This positioning matters because the paper treats analysis, comparison, and visualization as inseparable parts of HRTF research. In that sense, SAM is defined less as a single metric implementation than as a framework for measuring, comparing, and visualizing what HRTF data means.
2. Motivation and methodological rationale
The motivation for SAM is tied to current limitations in HRTF datasets and evaluation practice. The paper argues that dataset size is still too small for deep learning and large-scale validation; traditional HRTF acquisition is resource-intensive, requiring anechoic environments, loudspeaker arrays, and careful microphone placement; measurement errors and subject motion can reduce reliability; HRTF synthesis and upsampling are promising alternatives, but they require a reliable way to evaluate outputs numerically and visually; and existing workflows need a reproducible evaluation framework so that measured and synthetic HRTFs can be compared consistently (Poole et al., 7 Jul 2025).
Within this rationale, SAM is a practical response to the expanding role of computational HRTF generation. HRTF data are described as expensive to measure, difficult to harmonize across laboratories, and increasingly used in machine-learning and synthesis pipelines where researchers need to evaluate large numbers of HRTFs quickly. The toolbox therefore addresses a workflow gap rather than a single algorithmic deficiency: if HRTFs are to be synthesized, modified, harmonized, or learned by models, researchers need a common toolbox for metrics and inspection (Poole et al., 7 Jul 2025).
The paper’s framing also gives SAM a specific epistemic role. It is not introduced as a replacement for listening tests or for all perceptual evaluation, but as infrastructure for standardized, reproducible evaluation during iterative research and development.
3. Supported data and metric families
The paper situates SAM in the context of the SONICOM ecosystem and HRTF workflows. It is intended to work with HRTF-related data such as measured HRTFs, synthetic HRTFs, HRIRs / SOFA-formatted HRTF data, comparisons across different subjects, and comparisons across different synthesis methods (Poole et al., 7 Jul 2025).
| Aspect | Scope described in the paper |
|---|---|
| HRTF-related data | measured HRTFs; synthetic HRTFs; HRIRs / SOFA-formatted HRTF data |
| Comparison axes | different subjects; different synthesis methods |
| Main metric families | spectral distortion; interaural time differences (ITD); interaural level differences (ILD) |
| Dataset formats around SAM | SOFA format at 44.1 kHz and 48 kHz |
The explicitly named metric families are spectral distortion, interaural time differences, and interaural level differences. These are presented as key spatial audio parameters for assessing HRTF quality and consistency. The toolbox is intended to let users compute these quantities to evaluate how close two HRTFs are, whether two datasets are compatible, or how well a synthesized HRTF matches a measured one (Poole et al., 7 Jul 2025).
The paper does not provide formulas for these metrics, but it states that their inclusion implies numerical comparison across frequency- and direction-dependent HRTF responses. Because the extended dataset provides HRTFs in SOFA format at 44.1 kHz and 48 kHz, SAM is implicitly meant to operate on these kinds of standardized spatial audio data representations. This suggests that the toolbox is designed around standardized HRTF interchange rather than around a proprietary data representation (Poole et al., 7 Jul 2025).
Visualization is treated as coequal with numerical analysis. Although the paper does not enumerate specific plots or figures generated by the toolbox, it repeatedly emphasizes visual comparison of HRTFs alongside numerical metrics, especially for differences between measured and synthetic HRTFs, subject-to-subject variation, quality of synthesis outputs, and likely direction-dependent patterns over the measurement grid (Poole et al., 7 Jul 2025).
4. Role in the extended SONICOM workflow
SAM is embedded in a broader workflow organized around the extended SONICOM dataset. The paper describes a sequence in which 3D scans are preprocessed into watertight, aligned meshes; Mesh2HRTF is used to synthesize HRTFs for the subset of scans of sufficient quality; the resulting synthetic HRTFs are stored in the dataset in SOFA format; and SAM is then used to analyze and compare measured vs synthetic HRTFs, as well as HRTFs from different subjects or methods (Poole et al., 7 Jul 2025).
This placement makes SAM a key component for “closing the loop” between geometry, synthesis, and evaluation. The broader generation pipeline specified in the paper includes raw point clouds at 0.5 mm resolution, conversion to watertight meshes, alignment to the Frankfurt plane, hair removal and truncation below the neck, optional ear-canal plugging, mesh grading to reduce resolution away from the ipsilateral pinna, and HRTF synthesis using Mesh2HRTF with the boundary element method. SAM is the companion analysis layer for outputs from that pipeline (Poole et al., 7 Jul 2025).
Dataset scale is central to this role. The extended SONICOM dataset contains measured HRTFs for 300 subjects, synthetic HRTFs for 200 subjects, processed 3D scans (.stl), and demographic CSV data. The HRTFs were simulated using Mesh2HRTF, based on graded watertight meshes aligned to the Frankfurt plane, with simulation frequencies from 0 Hz to 24 kHz in 150 Hz steps across 793 spatial positions in the SONICOM grid. The paper explicitly links this scale and resolution to the need for a toolbox that can perform rapid numerical evaluation and visual inspection (Poole et al., 7 Jul 2025).
The workflow significance is therefore not only computational convenience. The combination of a large measured-and-synthetic dataset with a reproducible analysis layer is intended to facilitate rapid and iterative optimisation of HRTF synthesis algorithms, allowing automatic generation of large amounts of data and subsequent evaluation (Poole et al., 7 Jul 2025).
5. Morphological modification and machine-learning use
The extended SONICOM dataset includes multiple scan variants to support HRTF synthesis and anatomical experimentation: PXXXX_preprocessed.stl as a minimally modified scan, PXXXX_plugged.stl for ear canal occlusion, and PXXXX_graded_left.stl and PXXXX_graded_right.stl. These processed meshes support HRTF synthesis from realistic geometry and morphological modification studies, where anatomical features can be changed to see how they affect HRTFs. The paper states that the processed scans enable seamless morphological modifications, providing insights into how anatomical changes impact HRTFs; SAM complements this by providing the evaluation layer for checking what those modifications do to the resulting HRTFs (Poole et al., 7 Jul 2025).
The paper is equally explicit about machine-learning relevance. The enlarged dataset, with 300 measured subjects and 200 synthetic HRTFs, increases the scale of available training and validation data, and the larger sample size is said to enhance the effectiveness of machine learning approaches. SAM supports this ecosystem by enabling consistent evaluation of model outputs, including benchmarking generative or predictive HRTF models, validating HRTF harmonization or upsampling methods, comparing synthesized outputs against measured ground truth, and providing repeatable evaluation metrics during model development (Poole et al., 7 Jul 2025).
This suggests that SAM currently occupies the HRTF-analysis end of a broader spatial-audio-metrics landscape. Other work addresses different signal domains and evaluation targets: QASTAnet is a DNN-based quality metric specialized on spatial audio, with support for ambisonics and binaural signals and an output of predicted MUSHRA score (Llave et al., 20 Sep 2025); DPLM measures localization similarity between two binaural recordings through activation-level distances from deep networks trained for direction of arrival estimation (Manocha et al., 2021); SAQAM uses a multi-task learning framework to assess listening quality and spatialization quality between any given pair of binaural signals (Manocha et al., 2022); BINAQUAL is a full-reference objective localization-similarity metric for binaural audio (Panah et al., 17 May 2025); 3DAE provides time-frequency audio error maps for magnitude, ILD, IPD, temporal alignment, loudness, and high-frequency failures in binaural novel-view synthesis (Xu et al., 28 May 2026); ViSAGe evaluates generated FOA using audio energy maps with CC and AUC (Kim et al., 13 Jun 2025); and metric sensitivity for generative FOA has been analyzed using Responsiveness, Smoothness, and Symmetry (Kamath et al., 10 Jun 2026). In comparison, SAM’s stated emphasis remains HRTF analysis, cross-subject and cross-method comparison, and standardized visual and numerical evaluation (Poole et al., 7 Jul 2025).
6. Availability, evidentiary status, and limitations
The implementation notes given for SAM are high-level but clear: it is a Python package, it is open-source, it is publicly available, it is designed to be robust and extensible, and it is under continuous development (Poole et al., 7 Jul 2025).
The paper is also explicit about what is not provided. It does not report benchmark numbers, runtime measurements, or user studies for SAM itself. There are therefore no formal evaluation results for the toolbox beyond the qualitative claim that it enables standardized, reproducible, rapid HRTF evaluation and visualization. Likewise, no explicit equations or algorithmic formulas for SAM’s metrics are provided, and no detailed algorithmic description of its internal computation or plotting pipeline is given (Poole et al., 7 Jul 2025).
These omissions delimit the proper interpretation of the toolbox. A recurrent misunderstanding would be to treat SAM as a complete specification of HRTF metric computation, or as a package that directly analyzes every file type distributed with the extended dataset. The paper instead describes it as the HRTF analysis counterpart to the dataset, and it does not describe SAM as analyzing all scan and demographic file types directly (Poole et al., 7 Jul 2025).
Taken together, the evidence presented in the paper defines SAM as infrastructure for standardized HRTF evaluation rather than as a fully benchmarked perceptual metric. Its stated contribution is to accelerate HRTF validation, comparison of measured and simulated results, iterative synthesis improvement, morphological analysis, and machine-learning-based personalization research by providing a common computational layer for numerical and visual inspection (Poole et al., 7 Jul 2025).