function UVDis( filename,chuanx )
[data, fs] = audioread(filename);
%chia khung
f_d = 0.025;
f_size = round(f_d * fs);
[frames, num_fr] = Framing(data, fs, f_d);
t = [0 : 1/fs : length(data)/fs]; % thoi gian roi rac
t = t(1:end - 1);
%STE
STE = 0;
for i = 1 : num_fr
STE(i) = sum(frames(i, :).^2);
end
%chuan hoa du lieu ve bien do 1
STE = STE./max(STE);
%tao tin hieu STE
ste_fr = 0;
for i = 1 : length(STE)
l = length(ste_fr);
ste_fr(l : l + f_size) = STE(i);
end
% tin heu STE
t1 = [0 : 1/fs : length(ste_fr)/fs];
t1 = t1(1:end - 1);
%Do thi STE
subplot(4,1,1);
plot(t,data); hold on;
plot(t1,ste_fr,'r','LineWidth',1);
legend('Speech Signal','STE');
title('STE Algorithmc');
xlim([0 length(data)/(fs)]);
%ZCR
for i = 1 : num_fr
x = frames(i, :);
ZCR(i) = 0;
for j = 1 : length(x) - 1
if(x(j)*x(j + 1) < 0)
ZCR(i) = ZCR(i) + 1;
end
end
end
%chuan hoa du lieu ve bien do 1
ZCR = ZCR./max(ZCR);
%tao tin hieu ZCR
zcr_fr = 0;
for i = 1 : length(ZCR)
l = length(zcr_fr);
zcr_fr(l : l + f_size) = ZCR(i);
end
% ve ZCR theo tin hieu
t1 = [0 : 1/(fs) : length(zcr_fr)/(fs)];
t1 = t1(1:end - 1);
subplot(4,1,2);
plot(t,data); hold on;
plot(t1,zcr_fr,'r','LineWidth',1);
title('ZCR Algorithmc');
legend('Speech Signal','ZCR');
xlim([0 length(data)/(fs)]);
%dap an chuan
subplot(4,1,3);
plot(t, data); hold on;
for i = 2 : length(chuanx) - 1
plot([chuanx(i) ,chuanx(i)],[1, -1], 'green');
end
title('Standard');
legend('Speech Signal','Standard');
xlim([0 length(data)/(fs)]);
%chia khung va xac dinh
subplot(4, 1, 4);
plot(t, data); hold on;
for i = 2 : num_fr
UV(i) = VoicedUnvoiced(STE(i),ZCR(i));
if(UV(i)-UV(i - 1))
plot([f_d*i f_d*i], [1 -1], 'black');
end
end
title('Determined by algorithmc');
legend('Speech Signal','Determined by algorithmc');
xlim([0 length(data)/(fs)]);
end
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
matlab_(含教程)分别通过STE算法,ZCR算法来进行语音信号的端点检测matlab仿真.7z (9个子文件)
matlab_(含教程)分别通过STE算法,ZCR算法来进行语音信号的端点检测matlab仿真
matlab
Main.m 577B
THHL
phone_F1.wav 101KB
phone_M1.wav 130KB
studio_F1.wav 253KB
studio_M1.wav 235KB
func
Framing.m 360B
UVDis.m 2KB
VoicedUnvoiced.m 169B
教程.mp4 10.96MB
共 9 条
- 1
资源评论
mYlEaVeiSmVp
- 粉丝: 1944
- 资源: 19万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功