% Merge two speakerSet to get recog. rate of speaker identification % Roger Jang, 20070618 clear all; close all; more off; %pack; addMyPath; % Create necessary output directories currDir=pwd; dirName='output/png'; if exist(dirName)~=7, mkdir(dirName); end dirName='output/mat'; if exist(dirName)~=7, mkdir(dirName); end dirName='output/gmm'; if exist(dirName)~=7, mkdir(dirName); end cd(dirName); delete('*'); cd(currDir); timeInit=clock; % ====== Feature extration tInit=clock; sidOpt=sidOptSet; % ====== Generate speakerSet waveDir1='\dataSet\【鈦映科技】語者確認錄音'; speakerSet1=speakerSetRead(waveDir1, sidOpt.sentenceNumPerSpeaker); fprintf('Got wave info of %d persons from %s\n', length(speakerSet1), waveDir1); speakerSet1=speakerSetAddFea(speakerSet1, sidOpt); % Add mfcc to speakerSet1 waveDir2='\dataSet\【鈦映科技】語者確認錄音2'; speakerSet2=speakerSetRead(waveDir2, sidOpt.sentenceNumPerSpeaker); fprintf('Got wave info of %d persons from %s\n', length(speakerSet2), waveDir2); speakerSet2=speakerSetAddFea(speakerSet2, sidOpt); % Add mfcc to speakerSet2 waveDir3='\dataSet\【鈦映科技】語者確認錄音3'; speakerSet3=speakerSetRead(waveDir3, sidOpt.sentenceNumPerSpeaker); fprintf('Got wave info of %d persons from %s\n', length(speakerSet3), waveDir3); speakerSet3=speakerSetAddFea(speakerSet3, sidOpt); % Add mfcc to speakerSet3 % Merge data for training/test speakerSet=speakerSetMerge(speakerSet1, speakerSet2); speakerSet1=speakerSetMerge(speakerSet, speakerSet3); speakerSet2=[]; save output/mat/speakerSet speakerSet1 speakerSet2 % ====== Speaker identification when number of mixtures = gaussianNumBest (obtained from goUtterRrWrtGaussianNum.m) gaussianNumBestIndex=6; % This is specified only when goUtterRrWrtGaussianNum is not run goTrainGmm; goUtterRr; %goUtterRrOutsideTest; %goSegmentRr; % ====== Speaker verification %goSpeakerVerify; fprintf('Overall elapsed time = %g seconds\n', etime(clock, timeInit));