-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.m
60 lines (50 loc) · 2.15 KB
/
example.m
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
53
54
55
56
57
58
59
60
function example
% Run this file to see an example
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Version history
% - Version 2.0, October 2011: reduced the number of displayed digits
% - Version 1.0, June 2010: first release
% Copyright 2010-2011 Valentin Emiya and Emmanuel Vincent (INRIA).
% This software is distributed under the terms of the GNU Public License
% version 3 (http://www.gnu.org/licenses/gpl.txt).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%
% Set inputs
%%%%%%%%%%%%
originalFiles = {...
'example/targetSrc.wav';...
'example/interfSrc1.wav';...
'example/interfSrc2.wav'};
estimateFile = 'example/targetEstimate.wav';
%%%%%%%%%%%%%
% Set options
%%%%%%%%%%%%%
options.destDir = 'example/';
options.segmentationFactor = 1; % increase this integer if you experienced "out of memory" problems
%%%%%%%%%%%%%%%%%%%%
% Call main function
%%%%%%%%%%%%%%%%%%%%
res = PEASS_ObjectiveMeasure(originalFiles,estimateFile,options);
%%%%%%%%%%%%%%%%%
% Display results
%%%%%%%%%%%%%%%%%
fprintf('************************\n');
fprintf('* INTERMEDIATE RESULTS *\n');
fprintf('************************\n');
fprintf('The decomposition has been generated and stored in:\n');
cellfun(@(s)fprintf(' - %s\n',s),res.decompositionFilenames);
fprintf('The ISR, SIR, SAR and SDR criteria computed with the new decomposition are:\n');
fprintf(' - SDR = %.1f dB\n - ISR = %.1f dB\n - SIR = %.1f dB\n - SAR = %.1f dB\n',...
res.SDR,res.ISR,res.SIR,res.SAR);
fprintf('The audio quality (PEMO-Q) criteria computed with the new decomposition are:\n');
fprintf(' - qGlobal = %.3f\n - qTarget = %.3f\n - qInterf = %.3f\n - qArtif = %.3f\n',...
res.qGlobal,res.qTarget,res.qInterf,res.qArtif);
fprintf('*************************\n');
fprintf('**** FINAL RESULTS ****\n');
fprintf('*************************\n');
fprintf(' - Overall Perceptual Score: OPS = %.f/100\n',res.OPS)
fprintf(' - Target-related Perceptual Score: TPS = %.f/100\n',res.TPS)
fprintf(' - Interference-related Perceptual Score: IPS = %.f/100\n',res.IPS)
fprintf(' - Artifact-related Perceptual Score: APS = %.f/100\n',res.APS);
return