A speech or audio coding apparatus comprising: a transformation section configured to transform an input signal from a time domain to a frequency domain; an estimation section configured to estimate an energy envelope which represents an energy level for each subband of a plurality of subbands obtained by splitting a frequency spectrum of the input signal; a quantization section configured to quantize the energy envelope to obtain a quantized energy envelope comprising quantized subband energies for the plurality of subbands; a dominant frequency band identification section configured to identify one or more dominant frequency bands, a dominant frequency band being a subband in which the quantized energy envelope of the frequency spectrum has a local maximum value, a group determining section (302-1, 302-N, 303) configured to group the quantized subband energies into a plurality of groups, wherein the group determining section (302-1, 302-N, 303) is configured to adaptively determine group widths of the plurality of groups according to input signal characteristics, and wherein the group determining section (302-1, 302-N, 303) is configured to determine each dominant frequency band and subbands on both sides of the dominant frequency band each forming a descending slope of the quantized energy envelope as a corresponding dominant group and to determine continuous subbands other than the one or more dominant groups as one or more non-dominant groups; a first bit allocation section configured to allocate bits to each group of the plurality of groups to obtain a group-specific number of bits for each group of the plurality of groups; a second bit allocation section configured to allocate, for each group of the plurality of groups, the group-specific number of bits allocated to a respective group of the plurality of groups to the plurality of subbands belonging to the respective group; and a coding section configured to encode, for each subband of the plurality of subbands, the frequency spectrum in the respective subband using bits allocated to the respective subband. a transformation section configured to transform an input signal from a time domain to a frequency domain; an estimation section configured to estimate an energy envelope which represents an energy level for each subband of a plurality of subbands obtained by splitting a frequency spectrum of the input signal; a quantization section configured to quantize the energy envelope to obtain a quantized energy envelope comprising quantized subband energies for the plurality of subbands; a dominant frequency band identification section configured to identify one or more dominant frequency bands, a dominant frequency band being a subband in which the quantized energy envelope of the frequency spectrum has a local maximum value, a group determining section (302-1, 302-N, 303) configured to group the quantized subband energies into a plurality of groups, wherein the group determining section (302-1, 302-N, 303) is configured to adaptively determine group widths of the plurality of groups according to input signal characteristics, and wherein the group determining section (302-1, 302-N, 303) is configured to determine each dominant frequency band and subbands on both sides of the dominant frequency band each forming a descending slope of the quantized energy envelope as a corresponding dominant group and to determine continuous subbands other than the one or more dominant groups as one or more non-dominant groups; a first bit allocation section configured to allocate bits to each group of the plurality of groups to obtain a group-specific number of bits for each group of the plurality of groups; a second bit allocation section configured to allocate, for each group of the plurality of groups, the group-specific number of bits allocated to a respective group of the plurality of groups to the plurality of subbands belonging to the respective group; and a coding section configured to encode, for each subband of the plurality of subbands, the frequency spectrum in the respective subband using bits allocated to the respective subband.