0001
0002
0003 addpath /users/jang/matlab/toolbox/utility
0004
0005 waveDir='D:\dataSet\digitLetter\2009-ASPR';
0006 feaDir='D:\dataSet\digitLetter\2008-ASPR-fea';
0007 tcpFile='D:\dataSet\digitLetter\2008-ASPR-fea\aspr.tcp';
0008 mfccCfgFile='\users\jang\app\asr\mfcc\mfcc2.cfg';
0009
0010 if exist(feaDir)~=7, mkdir(feaDir); end
0011 waveData=recursiveFileList(waveDir, 'wav');
0012 waveNum=length(waveData);
0013 fid=fopen(tcpFile, 'w');
0014
0015
0016 for i=1:10
0017 fprintf('%d/%d: waveFile=%s\n', i, waveNum, waveData(i).path);
0018 [junk, theContent, junk, junk] = fileparts(waveData(i).path);
0019 feaFileName=sprintf('%s\\wn_%06d.fea', feaDir, i);
0020 [junk, feaFileBaseName, junk, junk] = fileparts(feaFileName);
0021 hcopyCmd=sprintf('hcopy.exe -C %s %s %s\n', mfccCfgFile, waveData(i).path, feaFileName);
0022 [hcopyStatus, hcopyResult]=dos(hcopyCmd);
0023 if hcopyStatus~=0
0024 fprintf('Error: hcopy.exe is not executed correctly!\n');
0025 fprintf('%s\n', hcopyResult);
0026 else
0027 fprintf(fid, '%s\t%s\t%s\n', feaFileBaseName, theContent, waveData(i).path);
0028 end
0029 end
0030
0031 fclose(fid);