wdcntall.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:1k
源码类别:
语音合成与识别
开发平台:
Matlab
- function [rate, error] = wdcntall(P, waveData, plotopt)
- % WDCNTALL Word counts of all wave files
- if nargin<1, P.frameSize=256; P.overlap=86; P.minEnergy=0.0115; end
- if nargin<2, load waveData.mat; end
- if nargin<3, plotopt = 1; end
- % ====== Get word count of each wave file
- for i = 1:length(waveData),
- fprintf('%g/%gn', i, length(waveData));
- estimate = wdcnt(waveData(i).wavepath, P, P.minEnergy, 0);
- correct = length(waveData(i).answer);
- error(i) = estimate-correct;
- end
- rate = sum(error==0)/length(error);
- if plotopt
- hist(error, -10:10);
- axis tight;
- end