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

📄 encoder.m

📁 the implement of the encoder and the decoder of the CELP
💻 M
字号:
function encoder(spch_frm,fm_count)

global sub_cnt b_hpf a_hpf d_hpf1 scalor frames maxv minv former szsubf gamma2


curr=min([(spch_frm.*scalor);maxv]);                           % Scale speech frames
curr=max([curr;minv]);

[curr,d_hpf1]=filter(b_hpf,a_hpf,curr,d_hpf1);                 % Highpass input speech at 100 HZ

% Make comsub subframe analysis buffer.  It is
% 1/2 frame behind curr and 1/2 frame ahead of former.
comsub(1:frames/2)=former((frames/2)+1:frames);                
comsub(frames/2+1:frames)=curr(1:frames/2);

former=curr;                                                    % Update buffer

lpc_eff=lpc_ana(curr,gamma2,fm_count);                          % LPC analysis 

for isub=1:frames/szsubf
    sub_cnt=sub_cnt+1;                                          % Accumulate sub-frame counter
    offset=(isub-1)*szsubf;
    v((sub_cnt-1)*szsubf+1:sub_cnt*szsubf)...                   % Routine encoding pitch and stochastic excitation in subframe
    =subcoding(comsub(1+offset:offset+szsubf),lpc_eff);         
end
    


⌨️ 快捷键说明

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