Search code examples
matlabspeech-recognitionspeech

Quantification of cepstral coefficients for speech coder


I have been working on Homomorphic speech coder I have obtained the cepstral coefficients of the signal and the next step I have been asked to perform is quantize the coefficients using adaptive quantizer. I am not sure how to quantize the coefficients as its value ranges from -1.5 to 1.5, if i quantise it I just get 0 and 1 which i'm sure is wrong. What is the right way to quantise it.


Solution

  • I think when you are being asked to quantize the coefficients, you are being asked to set a resolution and quantize to that resolution. For example if you are to quantize to a 32-bit number, this would mean you would divide your range into 2^32 bins and quantize your values into those bins. For example:

    offset = 1.5;
    input_range = 3;
    output_range = 2^32
    quantized_value = round((value + offset) / input_range * output_range);
    

    If you are being asked to use an adaptive quantizer that would mean that the resolution of the bins would be dynamic or the output bit width is variable. You would need to do more work to find what your goals are if you are going to write an adaptive algorithm for the quantization.