| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 495 人关注过本帖
标题:运行结果
只看楼主 加入收藏
changelz
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-9-11
收藏
 问题点数:0 回复次数:0 
运行结果
clear;
fprintf('Begin \n');
FS=22050;
time=2;
y=wavrecord(time*FS,FS,1);
%fprintf('end \n');
fprintf('\n');


for i=1
fprintf('The source file is ');
fname=sprintf('test\\1.wav',i);
   [y,fs,bits]=wavread(fname);
sound(y,fs,bits)

   disp(fname);
[tx1,tx2,tframe]=FrameDetect(y,FS);
 tvector=ones(12,tx2-tx1+1);
for i=1:tx2-tx1+1
     [tA,tB,tK,tR]=Durbin(tframe(i,:));
     tA=abs(lpc(tframe(i,:),12));
     % tC=Cepstrum(tA',60);
     % tvector(:,i)=tA';
end

distance=zeros(10,1);

for j=1
    clear rvectortemp;
    clear rvector;
    clear rc;
    filename=sprintf('model\\H1.mat',mod(j,10));
    fid=fopen(filename,'r');
    if fid==-1
        fprintf('Can''t open the file!\n');
        return;
    end
    rc=fread(fid,2,'int32');  
    [rvectortemp,count]=fread(fid,'double');
    fclose('all');
    if count==0
        fprintf('Read Error!\n');
        return;
    end
    rvector=reshape(rvectortemp,rc(1),rc(2));
    distance(j)=dtw(tvector,rvector);
end

distance=distance/sum(distance);
[error,result]=min(distance);
fprintf('The recognition result is :\n');
fprintf('%d',mod(result,10));
 fname=sprintf('test\\t1.wav \n',mod(result,10));
 fprintf('\n');
 disp(distance');

end
fprintf('End\n');
fprintf('\n');
运行上述程序后 结果是The source file is test\1.wav
                     The recognition result is:
                     2
                         1  0  0  0  0  0  0  0  0  0  0

这个结果是什么意思呢
搜索更多相关主题的帖子: source abs ones file 
2012-09-12 16:32
快速回复:运行结果
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016687 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved