You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: STE.m
    path of file: ./repos/BabyCryDetector/Monitor_matlab
    
    the code of the file until where you have to start completion: function [ feature_STE feature_STEAcc ] = STE( voice, fs, nBit )
%STE Calc Short-Time Energy of the voice
%   input: voice data
%   input: sample rate
%   input: number of bits per sample
%   output: short-time-energy feature of the voice data

    disp('Feature STE');
    frameLength = 20*0.001*fs; %frame length
    frameInc = frameLength;   %frame inc = frame length
    voiceFrames = enframe(voice, frameLength, frameInc);
    [framesNum frameLen] = size(voiceFrames); 

    
function [ feature_STE feature_STEAcc ] = STE( voice, fs, nBit )
%STE Calc Short-Time Energy of the voice
%   input: voice data
%   input: sample rate
%   input: number of bits per sample
%   output: short-time-energy feature of the voice data

    disp('Feature STE');
    frameLength = 20*0.001*fs; %frame length
    frameInc = frameLength;   %frame inc = frame length
    voiceFrames = enframe(voice, frameLength, frameInc);
    [framesNum frameLen] = size(voiceFrames); 
    
    temp = voiceFrames.^2;
    energy = sum(temp,2);
    
    feature_STE = mean(energy(energy>=(0.2*max(energy))));
    
    acc = diff(energy);
    feature_STEAcc = max(acc);
%     sortedAcc = sort(acc,'descend