0001
0002
0003 waveFile='主人下馬客在船.wav';
0004 waveFile='ws2_16khz.wav';
0005 [y, fs, nbits]=wavread(waveFile);
0006
0007 y=y*2^nbits/2;
0008 feature=wave2mfccMex(y, fs);
0009 mesh(feature);
0010 axis tight; box on;
0011
0012 dos(['copy /y ', waveFile, ' hcopy\file.wav']);
0013 dos('hcopy\HCopy -C hcopy\htk.cf -S hcopy\sp2fea.scp');
0014 feature2=readFeaFile('hcopy\file.fea');
0015
0016 fprintf('Difference between Vincent & hcopy = %g\n', max(max(abs(feature-feature2))));
0017
0018 feature3=wave2mfcc(waveFile);
0019 fprintf('Difference between Vincent & young = %g\n', max(max(abs(feature(1:13, :)-feature3(:, 1:13)'))));
0020 fprintf('Difference between hcopy & young = %g\n', max(max(abs(feature2(1:12, :)-feature3(:, 1:12)'))));