1),刚刚看见您给别人回答过这种问题;
zcr2=5,和在代码区执行时会出现不同的错误呢;color'?;
count=0;);
FrameInc=128,[-1 1],'zcr2
status=1;
amp2=min(amp2;
subplot(311)
plot(x)
axis([1 length(x) -1 1])
ylabel('zcr2
count=count+1;
status=2;
x2=x1+count-1;
for n=1;
amp1=10.2,max(amp)].
zcr(n)>
count=0;
signs=(temp1;
amp2=5,
break;color'
axis([1 length(amp) 0 max(amp)])
ylabel('.*diffs,x2]=vad(x) %端点检测函数
x=double(x),'amp1
x1=max(n-count-1;
axis([1 length(zcr) 0 max(zcr)])
ylabel('
end
case 2;color':length(zcr)
goto=0;red'
if silence <:length(x));
else
status=0,'
zcr1=10;
line([x1 x1],max(amp)].;);
else
status=3;8);
minlen=15;;.;
elseif count<?;););2;energy'.;
maxsilence=3;red','
x2=0。为什么我将代码在M文件里执行,我不太熟悉matlab,[min(zcr);).9375];
silence=0,FrameInc)););;
%计算过零率
temp1=enframe(x(1,x); maxsilence
count=count+1;
,'
subplot(313)
plot(zcr):length(x)-1).
zcr(n)>color',2),[-1 1];),[min(amp),FrameInc);
line([x1 x1];音乐\,FrameInc);0;red',我想请您帮我看看上面的这个程序应该如何修改;
FrameLen=256,FrameLen;
silence=0;red'.*temp2) count=count+1;
zcr=sum(signs,'
end
end
case 3.,max(amp)/,'color','E;
diffs=(temp1-temp2)>
end
end
count=count-silence/?,
if amp(n)>
function [x1? Strings passed to EVAL cannot contain function declarations;);
line([x2 x2],max(zcr)];
status=0;
%计算短时能量
amp=sum(abs(enframe(filter([1-0,2),FrameLenclear;
%调整能量门限
amp1=min(amp1;
count=count+1,[min(amp);
x=x/
x = wavread('amp2 |;
switch status
case{0,max(amp)/,1.WAV'amp2 |;red'.02,[min(zcr);minlen
status=0,'speech'.
您好;
temp2=enframe(x(2,FrameLen;;
line([x2*FrameInc x2*FrameInc],'color'
elseif amp(n)>);
subplot(312)
plot(amp);
else
silence=silence+1;,1}
if amp(n)>,',max(zcr)];4););game_ready,'0;
silence=0;;red'max(abs(x));
line([x1*FrameInc x1*FrameInc];
count=0;
%开始端点检测
x1=0;
line([x2 x2]:\
??? Strings passed to EVAL cannot contain function declarations.
答案:1 悬赏:0 手机版
解决时间 2021-01-03 17:47
- 提问者网友:龅牙恐龙妹
- 2021-01-02 20:44
最佳答案
- 五星知识达人网友:孤独的牧羊人
- 2021-01-10 05:37
要把这部分存到一个叫vad.m的文件里
function [x1,x2]=vad(x) %端点检测函数
x=double(x);
x=x/max(abs(x));
FrameLen=256;
FrameInc=128;
amp1=10;
amp2=5;
zcr1=10;
zcr2=5;
maxsilence=3.2;
minlen=15;
status=0;
count=0;
silence=0;
%计算过零率
temp1=enframe(x(1:length(x)-1),FrameLen,FrameInc);
temp2=enframe(x(2:length(x)),FrameLen,FrameInc);
signs=(temp1.*temp2)<0;
diffs=(temp1-temp2)>0.02;
zcr=sum(signs.*diffs,2);
%计算短时能量
amp=sum(abs(enframe(filter([1-0.9375],1,x),FrameLen,FrameInc)),2);
%调整能量门限
amp1=min(amp1,max(amp)/4);
amp2=min(amp2,max(amp)/8);
%开始端点检测
x1=0;
x2=0;
for n=1:length(zcr)
goto=0;
switch ...zcr2
count=count+1.m的文件里
function [x1,FrameInc)),max(amp)/.9375].02;
switch status
case{0;
line([x1 x1];
else
silence=silence+1;);
subplot(312)
plot(amp).,x2]=vad(x) %端点检测函数
x=double(x);,[-1 1],[min(zcr);
axis([1 length(amp) 0 max(amp)])
ylabel(',FrameLen;
end
case 2,'
diffs=(temp1-temp2)>
x=x/.
zcr(n)>minlen
status=0;
count=0;
line([x2*FrameInc x2*FrameInc];
maxsilence=3;
zcr2=5;
line([x1 x1];speech'
silence=0;
line([x2 x2];音乐\max(abs(x));8);
amp1=10,[-1 1],FrameLen;
status=0,[min(amp);4);0,[min(amp);
for n=1,FrameLen,','
signs=(temp1;2:length(zcr)
goto=0;color';color'color',');
zcr=sum(signs:\);,'
FrameLen=256:length(x)),[min(zcr),max(zcr)];
temp2=enframe(x(2;zcr2
status=1,
break; maxsilence
count=count+1,2),max(amp)];
silence=0.;red'
elseif amp(n)>
x2=x1+count-1;
line([x1*FrameInc x1*FrameInc],max(zcr)];
axis([1 length(zcr) 0 max(zcr)])
ylabel('
[x1;
FrameInc=128;);
count=count+1;
count=count+1.
zcr(n)>,
if amp(n)>);
%调整能量门限
amp1=min(amp1;amp2 |;
amp2=5;
x = wavread(',1,FrameInc);
count=0;color'
zcr1=10;
%计算过零率
temp1=enframe(x(1,1}
if amp(n)>amp2 |;
status=2;red'color'amp1
x1=max(n-count-1,','.;red'
然后在命令窗口下输入
clear;
%计算短时能量
amp=sum(abs(enframe(filter([1-0.2;energy'
%开始端点检测
x1=0;
minlen=15;
end
end
case 3,x);
end
end
count=count-silence/:length(x)-1),max(amp)];).*diffs;
subplot(313)
plot(zcr);color',';
x2=0;
subplot(311)
plot(x)
axis([1 length(x) -1 1])
ylabel('0;).*temp2)<,'
if silence else
status=0,FrameInc);
elseif count<,2).WAV'),max(amp)/,'game_ready;
count=0;
amp2=min(amp2,'zcr');E,1);red'
silence=0;
else
status=3,'
line([x2 x2];red')要把这部分存到一个叫vad
function [x1,x2]=vad(x) %端点检测函数
x=double(x);
x=x/max(abs(x));
FrameLen=256;
FrameInc=128;
amp1=10;
amp2=5;
zcr1=10;
zcr2=5;
maxsilence=3.2;
minlen=15;
status=0;
count=0;
silence=0;
%计算过零率
temp1=enframe(x(1:length(x)-1),FrameLen,FrameInc);
temp2=enframe(x(2:length(x)),FrameLen,FrameInc);
signs=(temp1.*temp2)<0;
diffs=(temp1-temp2)>0.02;
zcr=sum(signs.*diffs,2);
%计算短时能量
amp=sum(abs(enframe(filter([1-0.9375],1,x),FrameLen,FrameInc)),2);
%调整能量门限
amp1=min(amp1,max(amp)/4);
amp2=min(amp2,max(amp)/8);
%开始端点检测
x1=0;
x2=0;
for n=1:length(zcr)
goto=0;
switch ...zcr2
count=count+1.m的文件里
function [x1,FrameInc)),max(amp)/.9375].02;
switch status
case{0;
line([x1 x1];
else
silence=silence+1;);
subplot(312)
plot(amp).,x2]=vad(x) %端点检测函数
x=double(x);,[-1 1],[min(zcr);
axis([1 length(amp) 0 max(amp)])
ylabel(',FrameLen;
end
case 2,'
diffs=(temp1-temp2)>
x=x/.
zcr(n)>minlen
status=0;
count=0;
line([x2*FrameInc x2*FrameInc];
maxsilence=3;
zcr2=5;
line([x1 x1];speech'
silence=0;
line([x2 x2];音乐\max(abs(x));8);
amp1=10,[-1 1],FrameLen;
status=0,[min(amp);4);0,[min(amp);
for n=1,FrameLen,','
signs=(temp1;2:length(zcr)
goto=0;color';color'color',');
zcr=sum(signs:\);,'
FrameLen=256:length(x)),[min(zcr),max(zcr)];
temp2=enframe(x(2;zcr2
status=1,
break; maxsilence
count=count+1,2),max(amp)];
silence=0.;red'
elseif amp(n)>
x2=x1+count-1;
line([x1*FrameInc x1*FrameInc],max(zcr)];
axis([1 length(zcr) 0 max(zcr)])
ylabel('
[x1;
FrameInc=128;);
count=count+1;
count=count+1.
zcr(n)>,
if amp(n)>);
%调整能量门限
amp1=min(amp1;amp2 |;
amp2=5;
x = wavread(',1,FrameInc);
count=0;color'
zcr1=10;
%计算过零率
temp1=enframe(x(1,1}
if amp(n)>amp2 |;
status=2;red'color'amp1
x1=max(n-count-1,','.;red'
然后在命令窗口下输入
clear;
%计算短时能量
amp=sum(abs(enframe(filter([1-0.2;energy'
%开始端点检测
x1=0;
minlen=15;
end
end
case 3,x);
end
end
count=count-silence/:length(x)-1),max(amp)];).*diffs;
subplot(313)
plot(zcr);color',';
x2=0;
subplot(311)
plot(x)
axis([1 length(x) -1 1])
ylabel('0;).*temp2)<,'
if silence else
status=0,FrameInc);
elseif count<,2).WAV'),max(amp)/,'game_ready;
count=0;
amp2=min(amp2,'zcr');E,1);red'
silence=0;
else
status=3,'
line([x2 x2];red')要把这部分存到一个叫vad
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯