Computing the FFT magnitude with fixed-point arithmetic using the CMSIS-DSP library
In the previous chapter, we discovered that the Raspberry Pi Pico has enough memory to handle the data pipeline to extract the MFCCs, using floating-point arithmetic. However, this data format does not offer the best computational efficiency for our desired target platform.
In this recipe, we will uncover why floating-point arithmetic is inefficient on the Raspberry Pi Pico and propose the 16-bit fixed-point (Q15) arithmetic as a more practical alternative. To provide a hands-on understanding of Q15, we will guide you through calculating the FFT magnitude, using this data type with the CMSIS-DSP Python library in the Colab notebook. This approach will simplify the transition of the code to the Raspberry Pi Pico in subsequent chapters.
Getting ready
In the previous recipe, we learned how to extract MFCCs from an audio sample using TensorFlow. Nevertheless, it is necessary to consider whether...