-
Notifications
You must be signed in to change notification settings - Fork 1
/
jugg.m
29 lines (26 loc) · 798 Bytes
/
jugg.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
function match = jugg(net,test,inputps,outputps)
%JUGG Judge if the input voice signal match the net that has trained
% before
%
%Inputs:
% net the net that has trained before
% test the input voice signal
% inputps & outputps the parameters for function mapminmax
%
%Outputs:
% match if the voice signal is the voice of the person that the net
% trained for, the value is 1, else 0;
%
% Author Xiang Yingfei, 8-27-13
% Copyright 2013 TopBang Team.
% $Date: 2013/08/27 21:45 $
input_test=test(:,21:59)';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=mapminmax('reverse',an,outputps);
avg=mean(BPoutput,2);
if avg(1)<0.4&&avg(2)>0.6
match=1;
else match=0;
end
end