sidOpt=sidOptSet; [y, fs, nbits]=wavReadInt('001_1_1.wav'); dataMode=1; % float data type pfType=2; ptParam=ptParamSet(fs, nbits, pfType); ptParam.volThresholding=0; epdParam=epdParamSet(fs); epdParam.frameSize=ptParam.frameSize; % To match that of ptParam epdParam.overlap=ptParam.overlap; [epInSampleIndex, epInFrameIndex, soundSegment, zeroOneVec, volume]=feval(sidOpt.epdFcn, y, fs, nbits, epdParam, 1); % EPD if isempty(epInSampleIndex) msg=sprintf('Epd failure ===> %s', speakerSet(i).sentence(j).path); fprintf('%s\n', msg); fprintf(fid, '%s\n', msg); errorWaveId=[errorWaveId, j]; % Record error wave index due to failed EPD continue; end % Compute the mean volume, clarity, and pitch meanVolume=dot(zeroOneVec, volume)/sum(zeroOneVec); % Compute the mean clarity [pitch, clarity]=ptByPfMex(y, fs, nbits, ptParam, dataMode);