Skip to main content

Convolutive Transfer Function Invariant SDR

ISCA DOI arXiv

Run python tests PyPI codecov.io PyPI - Downloads License: MIT

This repository contains an implementation for the Convolutive transfer function Invariant Signal-to-Distortion Ratio objective for PyTorch as described in the publication Convolutive Transfer Function Invariant SDR training criteria for Multi-Channel Reverberant Speech Separation (IEEE ICASSP, RIS UPB, arXiv).

Here, a small example, how you can use this CI-SDR objective in your own source code:

import torch
import ci_sdr

reference: torch.tensor = ...
# reference.shape: [speakers, samples]

estimation: torch.tensor = ...
# estimation shape: [speakers, samples]

sdr = ci_sdr.pt.ci_sdr_loss(estimation, reference)
# sdr shape: [speakers]

The idea of this objective function is based in the theory from E. Vincent, R. Gribonval and C. Févotte, Performance measurement in blind audio source separation, IEEE Trans. Audio, Speech and Language Processing, known as BSSEval. The original author provided MATLAB source code (link) and the package mir_eval (link) contains a python port. Some people refer to these implementations as BSSEval v3 (link).

The PyTorch code in this package is tested to yield the same SDR values as mir_eval with the default parameters.

NOTE: If you want to use BSSEval v3 SDR as metric, I recomment to use mir_eval.separation.bss_eval_sources and use as reference the clean/unreverberated source signals. The implementation in this repository has minor difference that makes it problematic to compare SDR values accorss different publications (e.g. here the permutation is calculated on the SDR, while mir_eval computes it based on the SIR.).

Installation

Install it directly with Pip, if you just want to use it:

pip install ci-sdr

or to get the recent version:

pip install git+https://github.com/fgnt/ci_sdr.git

If you want to install it with all dependencies (test and doctest dependencies), run:

pip install "ci_sdr[all] @ git+https://github.com/fgnt/ci_sdr.git"
pip install git+https://github.com/fgnt/padertorch.git

When you want to change the code, clone this repository and install it as editable:

git clone https://github.com/fgnt/ci_sdr.git
cd ci_sdr
pip install --editable .
# pip install --editable .[all]
# pip install git+https://github.com/fgnt/padertorch.git

Citation

To cite this implementation, you can cite the following paper (IEEE ICASSP, RIS UPB, arXiv):

@inproceedings{boeddeker2021convolutive,
  title={Convolutive transfer function invariant SDR training criteria for multi-channel reverberant speech separation},
  author={Boeddeker, Christoph and Zhang, Wangyou and Nakatani, Tomohiro and Kinoshita, Keisuke and Ochiai, Tsubasa and Delcroix, Marc and Kamo, Naoyuki and Qian, Yanmin and Haeb-Umbach, Reinhold},
  booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
  pages={8428--8432},
  year={2021},
  organization={IEEE},
  doi={10.1109/ICASSP39728.2021.9414661}}
}

Metadata

Release files for ci-sdr 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ci-sdr 0.0.3
File Size Uploaded Provenance Actions
ci_sdr-0.0.3.tar.gz 19.3 kB Without provenance Details for ci_sdr-0.0.3.tar.gz

Release files / ci_sdr-0.0.3.tar.gz

Download URL ci_sdr-0.0.3.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
14001603caf6ee836d418849846fca53eb1d32b65433df40661b9ea16454eb43
BLAKE2b-256 checksum
How to use checksums
08f339d5069652e8c92f23caac87149ddab06fc2b5d2e219f33f719ca1842ffb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for ci-sdr 0.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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