akt#

Datasets from the Audio Communications Group of TU Berlin, Berlin, Germany.

  • BRAS-RS8: Benchmark for Room Acoustical Simulation: Reference Scene 8.

  • FABIAN: The FABIAN head-related transfer function data base.

  • HUTUBS: The HUTUBS head-related transfer function (HRTF) database.

class irdl.akt.AKTZipBaseDataset#

Bases: SofaBaseDataset

Base class for zipped datasets of the Audio Communications Group of TU Berlin.

_download(provider_dir: Path, **_dataset_kwargs) Path#

Download BRAS-RS8 Scene_descriptions.zip archive to the provider directory.

Only downloads the archive if it is not already cached in the provider directory. Returns the ZIP path so that _process can extract the requested SOFA file into the ingest directory.

Parameters:
provider_dirPath

Provider directory (e.g., cache/BRAS-RS8/provider/).

**_dataset_kwargsdict

Unused dataset-specific parameters (accepted for compatibility).

Returns:
Path

Path to the downloaded ZIP archive.

_process(provider_artifact: Path, ingest_path: Path, **_dataset_kwargs) Path#

Extract the requested SOFA file from the ZIP into the ingest directory.

Parameters:
provider_artifactpathlib.Path

Path to the ZIP archive in the provider directory.

ingest_pathpathlib.Path

Path to the SOFA file in the ingest directory.

**_dataset_kwargsdict

Unused dataset-specific parameters (accepted for compatibility).

Returns:
pathlib.Path

Path to the extracted SOFA file in the ingest directory.

_zipfile: str#
class irdl.akt.BrasRs8Dataset#

Bases: AKTZipBaseDataset

Download the BRAS RS8 dataset from DepositOnce.

BRAS RS8 extends the Benchmark for Room Acoustical Simulation (BRAS) by a finite curved reflector. The dataset contains nine scenes with various source and receiver configurations, covering dispersing and focusing reflections, as well as diffraction around the surface. In total, nearly 3,000 impulse responses were measured under controlled anechoic conditions.

Attributes:
namestr

Dataset name (“bras-rs8”).

doistr

Digital Object Identifier (“10.14279/depositonce-25649”).

_category = 'room_impulse_responses'#
_source_filename(**dataset_kwargs) str#

Construct the ingest-ready (SOFA) filename.

Parameters:
**dataset_kwargsdict

Expected key: scene.

Returns:
str

File name in format “RS8_{scene}.sofa”.

_validate_params(**dataset_kwargs) None#

Validate BRAS-RS8-specific parameters.

Parameters:
**dataset_kwargsdict

Must contain ‘scene’ (one of the valid scene identifiers).

Raises:
ValueError

If scene is not one of the valid scene identifiers.

_zipfile: str = '1_Scene_descriptions.zip'#
doi: str = '10.14279/depositonce-25649'#
classmethod get(scene: str = '01a', cache_dir: Path | str | None = None, export_dir: Path | str | None = None, output_format: str = 'pyfar') dict | Path | None#

Download the BRAS RS8 dataset from DepositOnce.

DOI: https://doi.org/10.14279/depositonce-25649

Parameters:
cache_dirstr

Cache directory for downloads. Defaults is the OS user cache directory. This default can be overridden by setting IRDL_CACHE_DIR environment variable.

export_dirstr, optional

Directory for final output. If specified, the data will be exported to <export_dir/BRAS-RS8/>. Else, it remains in <cache_dir/output/>.

output_formatstr

Output format: ‘pyfar’, ‘numpy’, ‘hdf5’, ‘sofa’, or ‘raw’.

scenestr, optional

Scene identifier to download. One of: ‘01a’, ‘01b’, ‘01c’, ‘02’, ‘03a’, ‘03b’, ‘03c’, ‘03d’, ‘03e’. Default is ‘01a’.

Returns:
dict or Path

For ‘pyfar’ / ‘numpy’: dict of in-memory objects. For ‘sofa’ / ‘hdf5’ / ‘raw’: Path to file on disk.

name: str = 'bras-rs8'#
class irdl.akt.FabianDataset#

Bases: AKTZipBaseDataset

Download and extract the FABIAN HRTF database from DepositOnce.

Attributes:
namestr

Dataset name (“fabian”).

doistr

Digital Object Identifier (“10.14279/depositonce-5718.5”).

_category = 'head_related_impulse_responses'#
_source_filename(**dataset_kwargs) str#

Construct the ingest-ready (SOFA) filename.

Parameters:
**dataset_kwargsdict

Expected keys: kind, hato.

Returns:
str

File name in format “FABIAN_HRIR_{kind}_HATO_{hato}.sofa”.

_validate_params(**dataset_kwargs) None#

Validate FABIAN-specific parameters.

Parameters:
**dataset_kwargsdict

Parameters to validate. Expected keys: kind, hato.

Raises:
ValueError

If kind or hato is out of range.

_zipfile: str = 'FABIAN_HRTF_DATABASE_v4.zip'#
doi: str = '10.14279/depositonce-5718.5'#
classmethod get(kind: str = 'measured', hato: int = 0, cache_dir: str | Path | None = None, export_dir: str | Path | None = None, output_format: str = 'pyfar') dict | Path | None#

Download and extract the FABIAN HRTF database from DepositOnce.

DOI: https://doi.org/10.14279/depositonce-5718.5

Parameters:
cache_dirstr

Cache directory for downloads. Defaults is the OS user cache directory. This default can be overridden by setting IRDL_CACHE_DIR environment variable.

export_dirstr, optional

Directory for final output. If specified, the data will be exported to <export_dir/FABIAN/>. Else, it remains in <cache_dir/output/>.

output_formatstr

Output format: ‘pyfar’, ‘numpy’, ‘hdf5’, ‘sofa’, or ‘raw’.

kindstr, optional

Type of HRTF to download. Either ‘measured’ or ‘simulated’. Default is ‘measured’.

hatoint, optional

Head-above-torso-rotation of HRTFs in degrees. One of: 0, 10, 20, 30, 40, 50, 310, 320, 330, 340, 350. Default is 0.

Returns:
dict or Path

For ‘pyfar’ / ‘numpy’: dict of in-memory objects. For ‘sofa’ / ‘hdf5’ / ‘raw’: Path to file on disk.

name: str = 'fabian'#
class irdl.akt.HutubsDataset#

Bases: AKTZipBaseDataset

Download the HUTUBS HRTF database from DepositOnce.

_category = 'head_related_impulse_responses'#
_source_filename(**dataset_kwargs) str#

Construct the ingest-ready SOFA file name.

_validate_params(**dataset_kwargs) None#

Validate HUTUBS-specific parameters.

_zipfile: str = 'HRIRs.zip'#
doi: str = '10.14279/depositonce-8487'#
classmethod get(subject: int = 1, kind: str = 'measured', cache_dir: str | Path | None = None, export_dir: str | Path | None = None, output_format: str = 'pyfar') dict | Path | None#

Download the HUTUBS HRTF database from DepositOnce.

DOI: https://doi.org/10.14279/depositonce-8487

Parameters:
cache_dirstr

Cache directory for downloads. Defaults is the OS user cache directory. This default can be overridden by setting IRDL_CACHE_DIR environment variable.

export_dirstr, optional

Directory for final output. If specified, the data will be exported to <export_dir/HUTUBS/>. Else, it remains in <cache_dir/output/>.

output_formatstr

Output format: ‘pyfar’, ‘numpy’, ‘hdf5’, ‘sofa’, or ‘raw’.

subjectint, optional

Subject identifier. Must be an integer in the range 1 to 96. Default is 1.

kindstr, optional

HUTUBS HRIR variant. Either ‘measured’ or ‘simulated’. Default is ‘measured’.

Returns:
dict or Path

For ‘pyfar’ / ‘numpy’: dict of in-memory objects. For ‘sofa’ / ‘hdf5’ / ‘raw’: Path to file on disk.

name: str = 'hutubs'#