Because the energy of the voice signal changes over time, the Energy Difference Between the voice and the voiced voice is quite significant. Therefore, the short-term energy and short-term average amplitude can be analyzed to describe the speech feature transformation. Defines the short-term average energy E of a voice signal at n time:
In formula, n is the window length, and the short-term energy is the weighted sum of squares of the sample values of a frame. When the window function is a rectangular window
Short-term average energy usage:
(1) it can be used as a feature parameter for distinguishing voiced and voiced audio;
(2) When the signal-to-noise ratio is relatively high, short-term energy can be used as a basis for distinguishing sound and silence;
(3) it can be used as an auxiliary feature parameter for speech recognition.
The short-term energy Matlab code is as follows:
X = wavread('beijing.wav '); % calculate n = 50, the voice energy S = FRA (50, 20, x) When frame shifting = 20; S2 = S. ^ 2; % energy of various points within a frame = sum (S2, 2); % calculate the energy of a frame subplot (, 1 ); % define drawing quantity and layout plot (energy); % voice Energy Map xlabel ('frames number') when drawing n = 50; % horizontal coordinate ylabel ('short-term energy e '); % Y coordinate legend ('n' = 50'); % curve ID axis ([, * 10 ^ 10]); % defines the range of X and Y coordinates
The energy for retrieving different frames is as follows:
FRA () is a frame separation function. The Matlab code is as follows:
function f=fra(len,inc,x)fh=fix(((size(x,1)-len)/inc)+1)f=zeros(fh,len);i=1;n=1;while i<=fh j=1; while j<=len f(i,j)=x(n); j=j+1;n=n+1; end n=n-len+inc; i=i+1;end