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_evalis 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=10option to the function call)
- differentiable via pytorch
- can run on GPU via pytorch
# from pypi pip install fast-bss-eval # or from source git clone https://github.com/fakufaku/fast_bss_eval 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_reference_file.wav, respectively, you can quickly evaluate the bss_eval
metrics as follows.
from scipy.io import wavfile import fast_bss_eval # open the files, we assume the sampling rate is known # to be the same fs, ref = wavfile.read("my_reference_file.wav") _, est = wavfile.read("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
2021 (c) Robin Scheibler, LINE Corporation
This code is released under MIT License.