Abstract: A method for a CELP algorithm including the steps of pre-processing (101) a sampled speech s{n} in a signal pre-processor so as to output at least a noise filtered speech output vector and a channel noise estimate, model parameter estimation of the noise filtered speech output vector so as to output a prediction residual and a long term prediction gain, encoding the prediction residual so as to output an adaptive codebook vector including an index of impulse response functions of a filter and a vector gain, formatting the encoded speech packets, is proposed wherein the step of encoding comprises in the following order the steps of determination of the gain by choosing a start value close to a theoretical optimal value, and vector optimisation by successive searching for an extremum of an estimate function based on a recursively corrected correlation vector.