Binamix - A Python Library for Generating Binaural Audio Datasets
Dan Barry, Davoud Shariat Panah, Alessandro Ragano, Jan Skoglund, Andrew Hines · 2025
Read Binamix - A Python Library for Generating Binaural Audio Datasets by Dan Barry, Davoud Shariat Panah, Alessandro Ragano, Jan Skoglund, Andrew Hines (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-01369.txt.
Introduction
Dan Barry, Davoud Shariat Panah, Alessandro Ragano, Jan Skoglund, and Andrew Hines release Binamix, a Python library for manufacturing binaural audio data sets. Their 2025 paper responds to spatial audio's data hunger: virtual reality, immersive media, and codec testing all need large, controlled collections of two-ear recordings, which are slow to capture in real rooms.
The library renders binaural mixes programmatically from the SADIE II database, which holds head and room response measurements for twenty subjects. Users can vary direction, height, subject, speaker layout, and mixing parameters freely. A triangulation method interpolates responses for angles the database lacks. Example scripts, utilities, and plotting tools round out the package, aimed at codec evaluation, quality-metric building, and machine learning training.
Catalog record
| CREATOR | Dan Barry, Davoud Shariat Panah, Alessandro Ragano, Jan Skoglund, Andrew Hines |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 19 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2505-01369
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Binamix - A Python Library for Generating Binaural Audio Datasets Dan Barry, Davoud Shariat Panah, Alessandro Ragano, Jan Skoglund, Andrew Hines Abstract The increasing demand for spatial audio in applications such as virtual reality, immersive media, and spatial audio research necessitates robust solutions to generate binaural audio data sets for use in testing and validation. Binamix is an open-source Python library designed to facilitate programmatic binaural mixing using the extensive SADIE II Database, which provides Head Related Impulse Response (HRIR) and Binaural Room Impulse Response (BRIR) data for 20 subjects. The Binamix library provides a flexible and repeatable framework for creating large-scale spatial audio datasets, making it an invaluable resource for codec evaluation, audio quality metric development, and machine learning model training. A range of pre-built example scripts, utility functions, and visualization plots further streamline the process of custom pipeline creation. This paper presents an overview of the library’s capabilities, including binaural rendering, impulse response interpolation, and multi-track mixing for various speaker layouts. The tools utilize a modified Delaunay triangulation technique to achieve accurate HRIR/BRIR interpolation where desired angles are not present in the data. By supporting a wide range of parameters such as azimuth, elevation, subject Impulse Responses (IRs), speaker layouts, mixing controls, and more, the library enables researchers to create large binaural datasets for any downstream purpose. Binamix empowers researchers and developers to advance spatial audio applications with reproducible methodologies by offering an open-source solution for binaural rendering and dataset generation. We release the library under the Apache 2.0 License at https://github.com/QxLabIreland/Binamix/ † † footnotetext: Accepted to the 158th Audio Engineering Society Convention Keywords Spatial Audio \cdot Binaural Rendering \cdot Python Library 1 Introduction Spatial audio has seen a significant rise in popularity across various domains in recent years, from virtual reality and immersive media to auditory research and perceptual evaluation. The release of new audio formats such as Dolby Atmos [ 1 ] and Google Eclipsa [ 2 ] provide the necessary platforms on which the modern era of spatial audio is being built. A significant rise in media consumption through headphones over the last decade [ 3 ] is also contributing to advances in the binaural rendering technology required to deliver spatial audio over headphones. As research in the areas of spatial audio codec creation and objective quality metrics [ 4 ] grows, the need for large-scale spatial audio data creation also increases. Such data is essential for testing and validation in codec and quality metric design. Additionally, large spatial audio datasets can be used to train machine learning algorithms for tasks like machine listening and no-reference quality estimation. Although there are existing tools for interfacing with HRIR libraries [ 5 ] and binaural rendering [ 6 ] , there is no existing solution which combines them together with robust binaural mixing tools, surround speaker layout emulation, and dataset generation. 2 Binamix Here, we present Binamix [ 7 ] , an open-source Python 3 library for binaural audio dataset generation. The library contains a set of pipeline tools for programmatic binaural mixing, leveraging the extensive SADIE II Database [7] which contains high-resolution Head Related Impulse Response (HRIR) and Binaural Room Impulse Response (BRIR) data for 20 subjects. SADIE II contains two dummy head subjects with 8802 IR sample points around the sphere and 18 human subjects with up to 2818 IR sample points around the sphere for the HRIRs and a more sparse sphere sampling for the BRIRs. SADIE was chosen due to its widespread use in both research and commercial applications but Binamix can be used with other HRIR datasets by providing your own scripts to interface with the IR files. 2.1 Motivation Our main work is principally focused on building audio quality metrics [ 4 ] [ 8 ] [ 9 ] [ 10 ] and as such we require large amounts of labeled data for testing and training. Datasets do exist for testing traditional audio quality metrics [ 11 ] but no such binaural audio dataset exists for testing spatial quality metrics. It is impractical to create enough data manually using spatial audio production tools in a Digital Audio Workstation (DAW), and furthermore, generating all of the test condition variations (subjects, speaker layouts, mixing variations, source locations, etc.) is demanding and requires significant domain knowledge. We developed the Binamix library to generate large amounts of binaural data for our work, but we believe it has many additional applications in spatial audio research. We decided to create our own direct binaural rendering pipeline instead of using an existing Ambisonics renderer. The rationale is that we need to measure the sensitivity of our algorithms to a change in a single variable (azimuth, elevation, subject, speaker layout etc.) without having to account for any spatial distortions arising from the Ambisonics encode/decode process. 2.2 Tools Overview The tools include functions for binaurally mixing and rendering sources for any given azimuth and elevation, even if the SADIE II subject data does not have discrete impulse responses for the desired angles. In this instance, the tools will automatically generate suitable binaural impulse responses at render time by identifying the nearest available angles using Delaunay triangulation [ 12 ] and then using Euclidean distance measures to calculate the interpolation weights. Various interpolation modes can be selected, depending on user requirements, which will be described in more detail in section 6 . This approach ensures that the rendered audio closely matches the intended spatial positioning. The tools can also simulate binaurally rendered channel-encoded surround sound by simulating vector-based amplitude panning methods (VBAP) [ 13 ] within our binaural mixing pipeline. This simulates the rendering of sources at virtual speaker positions between the discrete speaker locations defined in a surround speaker layout. As such, Binamix allows for simulating channel-encoded surround mixes which have been binaurally rendered. This was motivated by the fact that much of the legacy content which is still in use today, exists in channel-encoded surround formats such as 5.1 and 7.1. These legacy formats will ultimately become the source format for direct binaural rendering when delivered over headphones. Because of this, it is necessary to be able to simulate a wide variety of these conditions when building codecs and quality metrics for binaural audio. The tools also support binaural rendering of real-world channel-encoded surround mixes, if you have access to them. The library also includes a wide range of useful SADIE II wrapper functions which can be utilized to create custom pipelines and a range of example scripts to get started. Binamix also includes a loader script for the DSD100 Stems Database [ 14 ] , which contains individual stems for vocals, drums, bass, and other instruments. However, the tools can be used with any audio content. This paper introduces the main concepts of Binamix and serves as a starting point for using the library. The next section illustrates some usage examples of Binamix. 2.3 Applications In general, the library allows you to achieve almost any task requiring programmatic and repeatable binaural mixing or rendering. Specific use cases include: • Generating binaural and stereo mixes for general testing and evaluation. • Simulating various binaural reference and test conditions for audio codec creation and evaluation. • Simulating various binaural reference