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

📄 setlsfpar.m

📁 ITU-T G.723.1 Speech Coder: Matlab implementation This package implements the speech coder and de
💻 M
字号:
function LSFpar = SetLSFpar (LSFpar)% Set LSF parameters%% LSFpar.ECWin - Window applied to error filter coefficients%                File name, window vector, or expansion factor.%                Returned as a column vector default [1; ...; 1].% LSFpar.Mean:  Mean LSF values; File name or vector% LSFpar.VQ{1}: VQ table for first split VQ of differential LSF's% LSFpar.VQ{2}: VQ table for second split VQ of differential LSF's% LSFpar.Pcof:  LSF predictor coefficient (for differential quantization)% LSFpar.IntC:  Interpolation coefficients% LSFpar.Fix.Min% LSFpar.Fix.Max% LSFpar.Fix.MinSep% LSFpar.Fix.SepCheck% LSFpar.Fix.NIter% LSFpar.Fix.CosTable: Cosine table%               File name, cosine values, or table length.% $Id: SetLSFpar.m 1.3 2004/07/05 G.723.1-v2r1a $Nsplit = length (LSFpar.VQ);% Get the VQ tables, so Np can be determinedNp = 0;for (i = 1:Nsplit)  if (ischar (LSFpar.VQ{i}))    LSFpar.VQ{i} = load (LSFpar.VQ{i});  end  Np = Np + size (LSFpar.VQ{i}, 1);end% Bandwidth expansionif (isfield (LSFpar, 'ECWin'))  if (ischar (LSFpar.ECWin))    LSFpar.ECWin = load (LSFpar.ECWin);  elseif (length (LSFpar.ECWin) == 1)    alpha = LSFpar.ECWin;    LSFpar.ECWin = alpha.^(0:Np);  endelse  LSFpar.ECWin = ones (Np+1, 1);endLSFpar.ECWin = LSFpar.ECWin(:);% VQ parametersif (ischar (LSFpar.Mean))  LSFpar.Mean = load (LSFpar.Mean);endif (~ isfield (LSFpar, 'Pcof'))  LSFpar.Pcof = 1;end% Fix-up parametersif (~ isfield (LSFpar, 'Fix'))  LSFpar.Fix = [];endFix = LSFpar.Fix;if (~ isfield (Fix, 'Min'))  Fix.Min = 0;endif (~ isfield (Fix, 'Max'))  Fix.Max = pi;endif (~ isfield (Fix, 'MinSep'))  Fix.MinSep = 0;endif (~ isfield (Fix, 'SepCheck'))  Fix.SepCheck = 0;endif (~ isfield (Fix, 'NIter'))  Fix.NIter = 10;end% Cosine tableif (isfield (Fix, 'CosTable'))  if (ischar (Fix.CosTable))    Fix.CosTable = load (Fix.CosTable);  elseif (length (Fix.CosTable) == 1)    NCos = Fix.CosTable;    Fix.CosTable = cos ((0:(NCos-1)) * 2 * pi / NCos);  endendLSFpar.Fix = Fix;return

⌨️ 快捷键说明

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