I'm trying to compute the Cepstrum of an audio signal of N=4096 samples with a microcontroller by using a FFT only (inverse FFT not available).
This is my approach so far:
- Put the audio samples into the real parts of the complex array which will be the input for the FFT
- Set the imaginary parts of the complex array to zero
- Compute the FFT
- Scale the values by dividing them by N for the 0th bin and N/2th bin. For every other bin divide the value by N/2.
- Compute the power spectrum | x[k] |² = X_re[k]² + X_im[k]² for every frequency bin
Now I'm stuck! My questions are:
- Do I only have to consider the power spectrum from 0 to N/2 for the cepstrum computation since the power spectrum is symmetric about N/2? That would imply that I only have to compute N/2 + 1 samples for the next FFT (resp. IFFT), right?
- Do I have to put the power spectrum values into the real part of the complex input array for the FFT (resp. IFFT) and set the imaginary parts to zero?
- If 2. is correct, can I just run a normal FFT to do an IFFT (Method#4 from https://www.dsprelated.com/showarticle/800.php)
- Do I have to scale the values again by dividing by N after that?
Thank you very much!