pyroomacoustics.bss.fastmnmf2 module

FastMNMF2

Blind Source Separation using Fast Multichannel Nonnegative Matrix Factorization 2 (FastMNMF2)

pyroomacoustics.bss.fastmnmf2.fastmnmf2(X, n_src=None, n_iter=30, n_components=8, mic_index=0, W0=None, accelerate=True, callback=None)

Implementation of FastMNMF2 algorithm presented in

K. Sekiguchi, Y. Bando, A. A. Nugraha, K. Yoshii, T. Kawahara, Fast Multichannel Nonnegative Matrix Factorization With Directivity-Aware Jointly-Diagonalizable Spatial Covariance Matrices for Blind Source Separation, IEEE/ACM TASLP, 2020. [IEEE]

The code of FastMNMF2 with GPU support and more sophisticated initialization is available on https://github.com/sekiguchi92/SoundSourceSeparation

Parameters:
  • X (ndarray (nframes, nfrequencies, nchannels)) – STFT representation of the observed signal

  • n_src (int, optional) – The number of sound sources (default None). If None, n_src is set to the number of microphones

  • n_iter (int, optional) – The number of iterations (default 30)

  • n_components (int, optional) – Number of components in the non-negative spectrum (default 8)

  • mic_index (int or 'all', optional) – The index of microphone of which you want to get the source image (default 0). If ‘all’, return the source images of all microphones

  • W0 (ndarray (nfrequencies, nchannels, nchannels), optional) – Initial value for diagonalizer Q (default None). If None, identity matrices are used for all frequency bins.

  • accelerate (bool, optional) – If true, the basis and activation of NMF are updated simultaneously (default True)

  • callback (func, optional) – A callback function called every 10 iterations, allows to monitor convergence

Returns:

  • If mic_index is int, returns an (nframes, nfrequencies, nsources) array.

  • If mic_index is ‘all’, returns an (nchannels, nframes, nfrequencies, nsources) array.