資源簡介
求語音信號特征時必用的分幀函數,直接調用matlab工具箱運用,function函數,自定義函數。
代碼片段和文件信息
function?[ft]=enframe(xwininc)
?%ENframe?split?signal?up?into?(overlapping)?frames:?one?per?row.?[FT]=(XWININC)
?%
?%????F?=?ENframe(XLEN)?splits?the?vector?X(:)?up?into
?%????frames.?Each?frame?is?of?length?LEN?and?occupies
?%????one?row?of?the?output?matrix.?The?last?few?frames?of?X
?%????will?be?ignored?if?its?length?is?not?divisible?by?LEN.
?%????It?is?an?error?if?X?is?shorter?than?LEN.
?%
?%????F?=?ENframe(XLENINC)?has?frames?beginning?at?increments?of?INC
?%????The?centre?of?frame?I?is?X((I-1)*INC+(LEN+1)/2)?for?I=12...
?%????The?number?of?frames?is?fix((length(X)-LEN+INC)/INC)
?%
?%????F?=?ENframe(XWINDOW)?or?ENframe(XWINDOWINC)?multiplies
?%????each?frame?by?WINDOW(:)
?%
?%???The?second?output?argument?T?gives?the?time?in?samples?at?the?centre
?%???of?each?frame.?T=i?corresponds?to?the?time?of?sample?X(i).
?%
?%?Example?of?frame-based?processing:
?%??????????INC=20???????????????????????????????????????????????????????????%?set?frame?incremen
評論
共有 條評論