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

📄 find_harm.m

📁 语音编码中的MELP的经典估计
💻 M
字号:
%Find harmonics of the base frequency
%Input:
%        res(residual signal of the quantized LPC)
%        p3(final pitch)
%Output:
%        mag(fourier spectrum magnitude)

function mag=find_harm(res,p3)
down=fix(256/p3);                %floor level of the base frequency
M=fix(p3/4);                     %Get the number of the harmonics
if M<10
   for n=1:M
      up=fix((n+0.5)*512/p3);
      mag(n)=max(res(down:up));
      down=up+1;
   end
   mag=mag*sqrt(M)/norm(mag);
   mag(M+1:10)=1;  
else
   for n=1:10
      up=fix((n+0.5)*512/p3);
      mag(n)=max(res(down:up));
      down=up+1;
   end
   mag=mag*sqrt(10)/norm(mag);
end

⌨️ 快捷键说明

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