Documentation Status

Do you have a zillion BSS audio files to process and it is taking days ?
Is your simulation never ending ?

Fear no more! fast_bss_eval is here to help you!

fast_bss_eval is a fast implementation of the bss_eval metrics for the
evaluation of blind source separation. Our implementation of the bss_eval
metrics has the following advantages compared to other existing ones.

  • seemlessly works with both numpy arrays and pytorch tensors
  • very fast
  • can be even faster by using an iterative solver (add use_cg_iter=10 option to the function call)
  • differentiable via pytorch
  • can run on GPU via pytorch


Quick Start


# from pypi
pip install fast-bss-eval

# or from source
git clone
cd fast_bss_eval
pip install -e .


Assuming you have multichannel signals for the estmated and reference sources
stored in wav format files names my_estimate_file.wav and
my_reference_file.wav, respectively, you can quickly evaluate the bss_eval
metrics as follows.

from import wavfile
import fast_bss_eval

# open the files, we assume the sampling rate is known
# to be the same
fs, ref ="my_reference_file.wav")
_, est ="my_estimate_file.wav")

# compute the metrics
sdr, sir, sar, perm = fast_bss_eval.bss_eval_sources(ref.T, est.T)


This package is significantly faster than other packages that also allow
to compute bss_eval metrics such as mir_eval or sigsep/bsseval.
We did a benchmark using numpy/torch, single/double precision floating point
arithmetic (fp32/fp64), and using either Gaussian elimination or a conjugate
gradient descent



2021 (c) Robin Scheibler, LINE Corporation

This code is released under MIT License.


View Github