function sidOpt=sidOptSet % sidOptSet: Set parameters for speaker identification/verification % ====== Add necessary paths addpath d:/users/jang/matlab/toolbox/utility addpath d:/users/jang/matlab/toolbox/machineLearning addpath d:/users/jang/matlab/toolbox/sap addpath d:/users/jang/matlab/toolbox/asr -end % ====== Method sidOpt.method='dtw'; % 'dtw' (for text-dependent speaker ID) or 'gmm' (for text-independent speaker ID) sidOpt.useGtEpd=0; % Use GT EPD labelled by human, only available for "mir-2010-speakerId_label" sidOpt.epdFcn='epdByVol'; % epdByVol is better for GMM. % ====== Corpus directories %sidOpt.auDir01='d:/dataset/鈦映科技-2008-語者辨識/第一次錄音檔(100人)'; % Session 1 %sidOpt.auDir02='d:/dataset/鈦映科技-2008-語者辨識/第二次錄音檔(100人)'; % Session 2 sidOpt.auDir01='d:\dataSet\mir-2010-speakerId_label\session01'; % Session 1, with GT ednpoints sidOpt.auDir02='d:\dataSet\mir-2010-speakerId_label\session02'; % Session 2, with GT ednpoints % ====== Output dirs and files [parentDir, mainName]=fileparts(fileparts(sidOpt.auDir01)); sidOpt.outputDir=['output/', mainName]; % Output directory, such as 'mir-2010-speakerId_label' sidOpt.errorLogFile=[sidOpt.outputDir, '/error.log']; % ====== Use partial data for fast verification sidOpt.maxSpeakerNum=3; sidOpt.maxSpeakerNum=inf; sidOpt.sentenceNumPerSpeaker=3; % Use 3 utterance (1 password) per person, for fast computation sidOpt.sentenceNumPerSpeaker=inf; % === Evaluation mode sidOpt.mixData=0; % 1 for mix mode (two datasets are mixed, odd-indexed for training and even-indexed for testing) % ====== Feature/waveform related % === Feature type sidOpt.feaType='mfcc'; % 'mfcc', 'spectrum', 'volume', 'pitch' sidOpt.useEnergy=1; % mfcc dim=13 if useEnergy = 1; mfcc dim=12 if useEnergy=0 % === Temporal normalization mode sidOpt.temporalNormMode=1; % 0: nothing, 1: CMS (cepstrum mean subtraction), 2: CN (cepstrum normalization) % === Feature transformation mode sidOpt.feaTransformMode=0; % 0: nothing, 1: LDA, 2: PCA sidOpt.transformedFeaDim=10; % This is used only when the above option is 1 or 2 % === Feature/waveform options sidOpt.useWaveformNormalization=0; % 0 or 1 % === Use integer feature for embedded devices sidOpt.useIntFea=0; % Use integer feature (MFCC) for smartphone switch(sidOpt.method) case 'gmm' % ====== GMM parameters % === GMM model parameters sidOpt.exponent4gaussianNum=1:8; sidOpt.gaussianNums=2.^sidOpt.exponent4gaussianNum; sidOpt.covType=1; % === GMM training parameters sidOpt.gmmTrainParam.dispOpt=0; sidOpt.gmmTrainParam.useKmeans=1; sidOpt.gmmTrainParam.maxIteration=50; % === Use integer GMM for smartphone sidOpt.useIntGmm=0; case 'dtw' % ====== DTW parameters % === DTW type sidOpt.dtwFunc='dtw2'; % Set this to 'dtw1' (27-45-63) or 'dtw2' (0-45-90) sidOpt.useDtwPartialComputation=0; % Speedup via partial computation (does not speed up significantly) otherwise error('Unknown method!'); end