Computation of auditory models
Project description
auditory_models
Description
This repository provides multiple packages to compute auditory models, including
- Short Term Objective Intelligibility (STOI)
- Generalized Power Spectrum Model for audio quality (GPSMq)
- Binaural Auditory-Model-based Quality prediction (BAM-Q)
The repository is currently located here.
Prerequisites
Install Python >=3.12
Installation
pip install auditory_models
Usage
from auditory_models import GPSMq
import soundfile as sf
reference, fs_ref = sf.read("reference.wav")
degraded, fs_dgr = sf.read("degraded.wav")
if fs_ref != fs_dgr:
raise ValueError("Sample rates must be equal!")
gpsmq = GPSMq()
gpsmq.process(reference, degraded, fs_ref)
This usage example can be applied to any other auditory model. Each model class is designed to only take keyword
arguments so that they can be called in a default version without any arguments. The process() method is also
standardized across all models to take reference, degraded, and sample_rate. Please refer to the models'
individual documentation to learn more about their inputs and outputs.
Currently available models:
BAMQGPSMqSTOI- Base class for type hints:
AuditoryModel
For each model-class there exists a frontend() and a backend() method. The process() method calls them both in
succession, so frontend() and process() have the same input values and backend() and process() have the same
output values. Since there is no universal definition of a front and a back end, we stick to the following idea here:
frontend()is everything that extracts features from the audio databackend()is the statistical analysis of the features that results in the final value
Additional Info
STOIdiffers from its original implementation in that the center-frequencies of the third-octave bands are fixed to the frequencies defined by IEC 61260-1:2014.- There are some helpful implementations in
./auditory_models/helpers/like a Gammatone filterbank, a Matlab-like resample class, etc.
Support
Regarding issues please feel free to contact me via zimmermannmax16@gmail.com
Contributing
Any contribution is welcome.
Authors and acknowledgment
Author: Max Zimmermann
Reviewer: Thomas Biberger
Credits to:
- The developers of the original Matlab implementations
- STOI: Cees Taal
- GPSMq and BAM-Q: Thomas Biberger and Jan-Hendrik Fleßner
- Manuel Pariente for the original Python implementation of STOI
License
This project is licensed under the GNU General Public License v3 (GPLv3). For further info see file COPYING.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auditory_models-1.0.0.tar.gz.
File metadata
- Download URL: auditory_models-1.0.0.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8096de27166b45bd9a06c900ae9b4d322393d90c10b56298463e5cd68c2cd96
|
|
| MD5 |
f3e3c8c3138c08ddae9b1be80cc743f0
|
|
| BLAKE2b-256 |
bcbfa15a941938bb7536ca995d301ccabd639ed8c666fa0a21f5a2dbbd256d4a
|
File details
Details for the file auditory_models-1.0.0-py3-none-any.whl.
File metadata
- Download URL: auditory_models-1.0.0-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f349bd2c29e72602edfe2eb5b6c69e94736843cb32a5ccf03a6776d0fd3bb088
|
|
| MD5 |
07e11a2b5b9e44391fa2758fe55fb392
|
|
| BLAKE2b-256 |
054e0fda6987fa4e23a2d18d128d10d34c5fe242e26c26c2e3684e8ed286a42d
|