comparison help_html/source/messl_massef.m @ 11:f4d7400f5cf4

Added messl_massef to example.
author Christopher Hummersone <c.hummersone@surrey.ac.uk>
date Tue, 07 Mar 2017 11:02:56 +0000
parents
children
comparison
equal deleted inserted replaced
9:063175bfe283 11:f4d7400f5cf4
1 classdef messl_massef < MASSEFseparator
2 %MESSL_MASSEF Wrapper class for the MESSL algorithm.
3 %
4 % A wrapper class for the MESSL algorithm (https://github.com/mim/messl).
5 %
6 % MESSL_MASSEF properties:
7 % label - A label for the instance of the algorithm (shown in
8 % the results file).
9 % estTag - Tags for the estimated outputs.
10 % fs - The sampling frequency that the separator will run
11 % at.
12 %
13 % MESSL_MASSEF methods:
14 % messl_massef - Create an instance of the algorithm.
15 % separate - Run the separation algorithm on the time-domain
16 % mixture.
17 %
18 % See also MASSEF.
19
20 % Copyright 2016 University of Surrey.
21
22 properties % Public properties
23 fs % Sampling frequency
24 end
25
26 methods
27
28 function obj = messl_massef(fs) % constructor
29 %MESSL_MASSEF Create an instance of the separation algorithm
30 %
31 % OBJ = MESSL_MASSEF(FS) creates an instance of the MESSL
32 % algorithm at the sampling frequency FS.
33
34 % this code creates an instance of the object
35 obj.label = 'MESSL';
36 obj.estTag = {'Fancier usage'};
37 obj.fs = fs;
38
39 % check dependency is compiled
40 iosr.general.checkMexCompiled('logProbGmm.cpp');
41
42 end
43
44 % separation
45 function [signal,mask,est_azis,est_eles] = separate(obj,mixture)
46 %SEPARATE separate the mixture
47 %
48 % SIGNAL = OBJ.SEPARATE(MIXTURE) separates the time-domain
49 % mixture signal MIXTURE and produces the estimated output
50 % SIGNAL.
51
52 lr = mixture';
53 tau = tauGrid(0.15, obj.fs, 31);
54
55 m = messl(lr, tau, 2, 'vis', 1, 'ildPriorPrec', 3, ...
56 'GarbageSrc', 1, 'sr', 16000, 'vis', 0);
57
58 m2 = prob2mask(m);
59 signal = reconstruct(m2, lr, 1);
60
61 mask = [];
62 est_azis = [];
63 est_eles = [];
64
65 end
66
67 end
68
69 end