Skip to main content
the Seabass logo

Seabass - Python Implementation of the 2f Model

Seabass is a Python implementation of the 2f-model developed by the Internaltional Audio Laboratories Erlangen. It is a model for estimating subjective quality of separated audio source signals, specifically the mean MUSHRA score. The part of this code, particularly the computation of the Model Output Variables are based on the MATLAB implementation, PQEvalAudio, by Peter Kabal. See here for more details about the 2f-model.

Installation

git clone this-repository
cd 2f-model
pip install -e .

Usage

The computation of MOVs requires that the audio signal are scaled to have amplitudes in the range [-32768, 32767]. By default, seabass handles this automatically when using the CLI mode or estimate_mean_mushra_score_file, but not always when using estimate_mean_mushra_score.

When reading from files, soundfile reads the header and normalize it to floating point in the range [-1, 1). seabass then scales them up by 32768.

CLI

seabass --test-path /path/to/test-file.wav \
    --ref-path /path/to/reference-file.wav \
    --output-path /path/to/output.json

Python

Evaluating directly from files

from seabass.core.models.mms import estimate_mean_mushra_score_file

mms = estimate_mean_mushra_score_file(test_path, ref_path)

print(f"Estimated MMS: {mms:3.2f}")

Evaluating from loaded signals

When using loaded audio, make sure that your audio signals are either

  • in the range [-32768, 32767] and pass the argument signal_dtype='int16' to the function, or
  • in the range [-1, 1) and pass the argument signal_dtype='double' to the function.

If your audio signals are in the range [-1, 1), they will be multiplied by 32768 to scale them to [-32768, 32768). If this is not what you want, you can scale them yourself before passing them to the function with signal_dtype='int16'.

import soundfile as sf
from seabass.core.models.mms import estimate_mean_mushra_score

ref_signal, fs_r = sf.read(ref_path, always_2d=True)
test_signal, fs_t = sf.read(test_path, always_2d=True)

# soundfile returns (n_samples, n_channels) but seabass expectes (n_channels, n_samples)
ref_signal = ref_signal.T 
test_signal = test_signal.T

assert fs_r == fs_t == 48000
# PEAQ only works with 48 kHz signals
# if your signals are not 48 kHz, resample them

mms = estimate_mean_mushra_score(test_signal, ref_signal)

print(f"Estimated MMS: {mms:3.2f}")

Metadata

Release files for seabass-2f 0.1.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 seabass-2f 0.1.0
File Size Uploaded Provenance Actions
seabass_2f-0.1.0.tar.gz 20.0 kB With provenance Details for seabass_2f-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for seabass-2f 0.1.0
File Interpreter ABI Platform Actions
seabass_2f-0.1.0-py3-none-any.whl Python 3 none any Details for seabass_2f-0.1.0-py3-none-any.whl

Total release size: 43.2 kB

Release files / seabass_2f-0.1.0.tar.gz

Download URL seabass_2f-0.1.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
496c9c0637baddde0f3c27bec3e1055db15285ef49d8e9679c289e3e90d321bd
BLAKE2b-256 checksum
How to use checksums
6b25249dbf6486d1305b4f0a5f6bd0d98bcd4f5b16b99eca1d71b0ed706d3d17
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 May 13, 2026.

Transparency log

Release files / seabass_2f-0.1.0-py3-none-any.whl

Download URL seabass_2f-0.1.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8771c38c0ec684f36ec1dba1763a748ae57d5e258b7e8511676d01d5bc075aec
BLAKE2b-256 checksum
How to use checksums
5052fe79add9db11092e9370329ce0eb2ce789589610025f32c633fd3dda072f
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 May 13, 2026.

Transparency log

Security for seabass-2f 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for seabass_2f-0.1.0.tar.gz

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 May 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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