1 / 7
文档名称:

语音中提取基音频率matlab法度模范.doc

格式:doc   大小:22KB   页数:7页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

语音中提取基音频率matlab法度模范.doc

上传人:260933426 2022/4/3 文件大小:22 KB

下载得到文件列表

语音中提取基音频率matlab法度模范.doc

相关文档

文档介绍

文档介绍:语音中提取基音频率matlab程序
%%
% correlation for pitch estimation
% flag =1 from left to right, otherwise, from right tmi=[1];
for i=1:L-1
if s(i)>s(i+1)
newstate=-1;
end
if s(i)t*max_value
j=j+1;
mi(j)=i;
end
end
oldstate=newstate;
end
ll=length(mi);
mi(ll+1)=length(s);
%%
% This is a function to find the pitch period of a long enough speech
% interval. In order to find correct pitch period, it is in favor of
% selecting short period. ., if p1p2*Thr, we select p1
% instead of p2.
%
% usage [p,mx]=pitch(s)
%输入一个序列s,首先求出其自相关序列rr
%要求出第一个周期的极大值点
%首先求出序列的最大值maxim所在的位置,如果这个位置在THR_largepitch以内
%就认为这就是要求的点。如果这个位置大于THR_largepitch,就考虑小于
%THR_largepitch的范围内有没有点满足以下条件:大于maxim*THR_MAXX的极值点,
%大于max(THR_corr,THR_pitch*maxim).
%如果有满足条件的,第一个点就是所求点
%至于为什么可以这样做,还没搞懂
%总的说来,这个函数返回一个序列的第一个周期
function [p,mx]=pitch(s)
THR_pitch=;
THR_maxx=;
THR_corr=;
THR_largePitch=60;
epsilon=-10; % used to avoid dividing by zero
L=length(s);
d=100;
rr=corr(s,d,0);%最后一个参数是0,求自相关时从右到左
[maxim,mxi]=max(rr);
%当rr是一个行向量时,[Y,I]=max(s);Y是s中的最大值,I是标量
%存放了最大值的位置
ind_pitch=mxi;
if mxi>THR_largePitch
mi=maxx(rr,THR_maxx);%实际上就是以最大值点的t倍为