Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
/ pyass Public

Python implementation of the PEASS (Perceptual Evaluation methods for Audio Source Separation) toolkit.

Notifications You must be signed in to change notification settings

estevE11/pyass

Repository files navigation

pyass

pyass is a Python implementation of the PEASS (Perceptual Evaluation methods for Audio Source Separation) toolkit. It provides objective measures for evaluating the quality of audio source separation algorithms.

Currently, it implements the PEASS_ObjectiveMeasure function, which calculates:

  • OPS: Overall Perceptual Score
  • TPS: Target-related Perceptual Score
  • IPS: Interference-related Perceptual Score
  • APS: Artifact-related Perceptual Score

This project is a port of the original MATLAB implementation.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/pyass.git
    cd pyass
  2. Create a virtual environment (optional but recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

Usage

You can use pyass as a library in your Python scripts.

from pyass.peass import PEASS_ObjectiveMeasure

# Define paths to your audio files
# originalFiles should be a list containing the target source and interference sources
originalFiles = ['target.wav', 'interf1.wav', 'interf2.wav']
estimateFile = 'estimate.wav'

# Options dictionary
options = {'destDir': './output/'}

# Calculate metrics
results = PEASS_ObjectiveMeasure(originalFiles, estimateFile, options)

# Print results
print(f"OPS: {results['OPS']}")
print(f"TPS: {results['TPS']}")
print(f"IPS: {results['IPS']}")
print(f"APS: {results['APS']}")

Structure

  • peass.py: Main entry point containing PEASS_ObjectiveMeasure.
  • gammatone.py: Implementation of the Gammatone filterbank.
  • pemo_filterbank.py: Wrapper for the auditory filterbank.
  • decomposition.py: Least-squares decomposition logic.
  • pemo.py: PEMO-Q metric implementation.
  • mapping.py: Functions to map objective metrics to subjective scales.
  • erbBW.py: Helper for ERB bandwidth calculation.

Acknowledgements

This code is based on the PEASS toolkit.

About

Python implementation of the PEASS (Perceptual Evaluation methods for Audio Source Separation) toolkit.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages