% Evaluate utterance-based recognition rate for speaker identification tInit=clock; addMyPath; paramSet; load output\mat\speakerSet.mat if maxSpeakerNum %.2f%%\n', speakerSet1(index(i)).name, recog(index(i))*100); end fprintf('Overall inside-test recognition rate is %.2f%%.\n', overallRecogRate*100); % ====== Outside test fprintf('Outside test:\n'); [overallRecogRate, confMat, speakerSet2]=getExePerf(speakerSet2, gmm); fprintf('Recognition rate for each person:\n'); recog=zeros(length(speakerSet2),1); for i=1:length(speakerSet2) recog(i)=confMat(i,i)/sum(confMat(i,:)); end [junk, index]=sort(recog); for i=1:length(index) fprintf('\t%s ===> %.2f%%\n', speakerSet2(index(i)).name, recog(index(i))*100); end fprintf('Overall outside-test recognition rate is %.2f%%.\n', overallRecogRate*100); className={speakerSet1.name}; figure; confMatPlot(confMat, className); eval(['print -dpng output\png\', mfilename]); fprintf('%s ===> %g seconds\n', mfilename, etime(clock, tInit));