資源簡介
該算法是基于matlab軟件平臺上實現的,實現語音編碼

代碼片段和文件信息
function?[xhatektheta0Pb]?=?celp16k(xNLMccbPidx)
%??celp?-->?16000?bps?CELP?analyzer?and?synthesizer.
%
%????[xhatektheta0Pb]?=?celp16k(xNLMccbPidx)
%
%????The?function?implements?a?16000?bps?CELP?analyzer?and?synthesizer
%????if?the?speech?signal?is?sampled?at?8?kHz?the?frame?size?N?is?20?ms
%????(160?samples)?and?the?block?duration?L?for?the?excitation?sequence
%????selection?is?5?ms?(40?samples).?Furthermore?assume?that?the
%????codebook?has?1024?sequences?which?require?10?bit?to?send?the?index?k
%????and?that?the?lag?of?the?pitch?filter?P?is?searched?in?the?range?16
%????to?160?which?require?8?bit?to?represent?exactly.?Thus?the?quantization
%????procedure?only?affects?the?M?=?12?LPC?parameters?(inverse?sine)?coded
%????by?12?bits?the?gain?Theta0?coded?by?13?bit?and?the?pitch?filter?coeff.
%????b?coded?by?13?bit.
Nx?=?length(x);?????????????????????????%?Signal?length.
F??=?fix(Nx/N);?????????????????????????%?No.?of?frames.
J??=?N/L;???????????????????????????????%?No.?blocks?per?frame.
%?Initialize?output?signals.
xhat???=?zeros(Nx1);???????????????????%?Synthesized?signal.
e??????=?zeros(Nx1);???????????????????%?Excitation?signal.
k??????=?zeros(JF);????????????????????%?Columns?are?excitation
theta0?=?zeros(JF);????????????????????%?parameters?per?frame.
P??????=?zeros(JF);
b??????=?zeros(JF);
ebuf??=?zeros(Pidx(2)1);???????????????%?Vectors?with?previous?excitation
ebuf2?=?ebuf;?bbuf?=?0;?????????????????%?samples.
Zf?=?[];?Zw?=?[];?Zi?=?[];??????????????%?Memory?hangover?in?filters.
for?(f=1:F)
??%fprintf(1‘...?frame?no.?%g?out?of?%g.\n‘fF);
??n?=?(f-1)*N+1:f*N;????????????????????%?Time?index?of?current?speech?frame.
??[kappakftheta0fPfbfebufZfZw]?=?celpana(x(n)LMccbPidxbbuf...
????????????????????????????????????????????????????????????????ebufZfZw);
??sigma??=?2/pi*asin(kappa);
??sigma??=?udecode(uencode(sigma12)12);
??kappa??=?sin(pi/2*sigma);
??theta0?=?udecode(uencode(theta0130.2)130.2);
??b??????=?udecode(uencode(b131.4)131.4);
??[xhat(n)ebuf2Zi]?=?celpsyn(cbkappakftheta0fPfbfebuf2Zi);
??%?Output?excitation?signal?and?parameters?for?current?frame.
??e(n)????????=?ebuf(Pidx(2)-N+1:Pidx(2));
??k(:f)??????=?kf;
??theta0(:f)?=?theta0f;
??P(:f)??????=?Pf;
??b(:f)??????=?bf;?bbuf?=?bf(J);???????%?Last?estimated?b?used?in?next?frame.
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????113860??2012-10-18?00:21??CELP_done\16kbps_CELP.jpg
?????文件??????113917??2012-10-18?00:24??CELP_done\9600bps_CELP.jpg
?????文件????????2377??2012-10-17?18:08??CELP_done\celp16k.m
?????文件????????2368??2012-10-17?18:08??CELP_done\celp9600.m
?????文件????????1758??2012-10-17?17:49??CELP_done\celpana.m
?????文件????????4540??2012-10-17?17:50??CELP_done\celpexcit.m
?????文件????????2188??2012-10-17?17:50??CELP_done\celpsyn.m
?????文件????????2107??2012-10-18?01:39??CELP_done\CELP_RUN.m
?????文件????????1496??2012-10-17?17:51??CELP_done\durbin.m
?????文件??????146270??2012-10-18?03:50??CELP_done\handel.wav
?????文件????????1098??2012-10-17?17:12??CELP_done\lpcana.m
?????文件?????????875??2012-10-17?17:51??CELP_done\lpcrespitch.m
?????文件?????????477??2012-10-17?17:51??CELP_done\lpcweight.m
?????文件?????????355??2012-10-17?18:09??CELP_done\rf2lpc.m
?????文件??????118841??2012-10-18?00:20??CELP_done\speech_all_CELP.jpg
?????文件????????1313??2014-02-12?14:12??license.txt
- 上一篇:matlabSimuli
nk仿真模型.doc - 下一篇:相關干涉儀算法
評論
共有 條評論