function speakerSet=speakerSetAddFea(speakerSet, sidOpt); fid=fopen(sidOpt.errorLogFile, 'a'); fprintf(fid, 'Error logged within %s\n', mfilename); fprintf(fid, 'Time ===> %s\n', datestr(now)); % ====== Feature extraction speakerNum=length(speakerSet); for i=1:speakerNum tic errorWaveId=[]; for j=1:length(speakerSet(i).sentence) % fprintf('\t%d/%d: Get features from %s...\n', j, length(speakerSet(i).sentence), speakerSet(i).sentence(j).path); % [y, fs, nbits]=wavReadInt(speakerSet(i).sentence(j).path); au=myAudioRead(speakerSet(i).sentence(j).path); y=au.signal; fs=au.fs; nbits=au.nbits; [fea, errorStatus, meanVolume, meanClarity, medianPitch]=wave2fea(au, sidOpt); speakerSet(i).sentence(j).fea=fea; speakerSet(i).sentence(j).meanVolume=meanVolume; speakerSet(i).sentence(j).meanClarity=meanClarity; speakerSet(i).sentence(j).medianPitch=medianPitch; if errorStatus, errorWaveId=[errorWaveId, j]; end end speakerSet(i).sentence(errorWaveId)=[]; % Delete error wave fprintf('%d/%d: Feature extraction from %d recordings by %s ===> %g sec\n', i, speakerNum, length(speakerSet(i).sentence), speakerSet(i).name, toc); end fprintf(fid, '\n'); fclose(fid);