The invention discloses a layered voice coding and decoding method based on MDCT coefficient residual
vector quantization, which comprises the following steps: preprocessing
voice data for training, and training to generate a multi-level quantization
codebook of MDCT; the method comprises the following steps of: enhancing a high-frequency component of voice to be coded through a pre-emphasis filter, windowing a pre-emphasis voice
signal, generating an MDCT coefficient based on an FFT (
Fast Fourier Transform)
algorithm, determining a
bit allocation mode according to a
code rate to generate a coding control bit, compressing a
codebook index and the coding control bit through
Huffman coding, and transmitting a code
stream to a channel; the method comprises the steps of reading a code
stream in a channel, obtaining a coding control bit and an MDCT
codebook index through
Huffman decoding, determining a voice sampling rate and a bit distribution mode through the coding control bit, obtaining an MDCT vector based on MDCT codebook index retrieval, and restoring an original voice
signal through de-emphasis filtering. Through the design of MDCT layered coding, the coder can dynamically adjust coding bit distribution according to the
code rate condition, so that the method adapts to the actual communication environment and deals with the sudden network condition.