-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathseparate_spat_comps.m
More file actions
52 lines (46 loc) · 2.25 KB
/
Copy pathseparate_spat_comps.m
File metadata and controls
52 lines (46 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function ie = separate_spat_comps(x, mix_str)
%
% ie = separate_spat_comps(x, mix_str);
%
% separate spatial components
%
%
% input
% -----
%
% x : [nchan x nsampl] mixture signal
% mix_str : input mix structure
%
%
% output
% ------
%
% ie : [nsrc x nsampl x nchan] estimated source images
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Flexible Audio Source Separation Toolbox (FASST), Version 1.0
%
% Copyright 2011 Alexey Ozerov, Emmanuel Vincent and Frederic Bimbot
% (alexey.ozerov -at- inria.fr, emmanuel.vincent -at- inria.fr, frederic.bimbot -at- irisa.fr)
%
% This software is distributed under the terms of the GNU Public License
% version 3 (http://www.gnu.org/licenses/gpl.txt)
%
% If you use this code please cite this research report
%
% A. Ozerov, E. Vincent and F. Bimbot
% "A General Flexible Framework for the Handling of Prior Information in Audio Source Separation,"
% IEEE Transactions on Audio, Speech and Signal Processing 20(4), pp. 1118-1133 (2012).
% Available: http://hal.inria.fr/hal-00626962/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[nchan, nsampl] = size(x);
nsrc = length(mix_str.spat_comps);
WG = comp_WG_spat_comps(mix_str);
ie = zeros(nsrc, nsampl, nchan);
for j = 1:nsrc
if strcmp(mix_str.transf, 'stft')
ie(j,:,:) = filter_stft(x.',WG(:,:,:,:,j));
else % 'qerb'
ie(j,:,:) = filter_qerbt(x.',WG(:,:,:,:,j),mix_str.fs,mix_str.wlen);
end;
end;