⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find_f0_acorr.m

📁 用于语音识别语音增强方面的matlab工具包
💻 M
字号:
function f0 = find_f0_acorr(x)% FIND_F0_ACORR  Find fundamental frequency using autocorrelation method%%    F0 = FIND_F0_ACORR(X)%%    Find the fundamental frequency of signal X using the%    autocorrelation method.% $Id: find_f0_acorr.m 3 2004-02-04 12:57:04Z mairas $% maximum amplitude of the first minimum compared to r(0)relmin=0.5;% interpolation ratioirat=16;r=xcorr(x.s);r_=r((length(r)+1)/2:length(r));xr_=0:length(r_)-1;r_i=interp(r_,irat);xr_i=interp(xr_,irat);% find the first local minimumi=1;% if the relmin condition was not used, an autocorrelation% curve with small 'high-frequency ripple' would break the% zero-lobe ignoring algorithmwhile i<length(r_i) & (r_i(i)>r_i(i+1) || r_i(i)>relmin*r_i(1))  i=i+1;endif i==length(r_i)  i=i-1;end% find the maximum and calculate corresponding f0[r0,C]=max(r_i(i:end));t=xr_i(i+C-1);f0=x.fs/t;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -