A method of concealing bit errors in a signal is provided. The method comprises
encoding a signal parameter according to a set of constraints placed on a signal
parameter quantizer. The encoded signal parameter is decoded and compared against
the set of constraints. Finally, the method includes declaring the decoded signal
parameter invalid when the set of constraints is violated. Training binned ranges
of gain values provide a threshold for selecting data segments to examine for violation
of constraints on gain differences. Further, an additional method comprises training
a threshold function T(qlg(m-1), qlg(m-1) used in a codec bit error detecting
technique. The threshold function is based upon a first training file having N
signal segments. The method includes encoding the first training file and determining
gain values qlg(m) of each of the N signal segments within the encoded first training
file. The gain values form a range and the range is divided into bins. Next, the
gain values are stored in a second training file. The method associates each of
particular ones of the gain values and gain differences within the sequence qlg(m-1)
and qlg(m-1) with a corresponding one of the bins.