esp-dsp-skill

Generates ESP-DSP firmware code for FFT, FIR, IIR, matrix, and Kalman filtering on ESP32 chips.

28|3|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-dsp-skill-jasonyang170
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: esp-dsp-skill
Source: https://github.com/JasonYANG170/esp-dev-skill/tree/main/repos/esp-dsp
Command: npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-dsp-skill-jasonyang170

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing signal-processing firmware with Espressif's ESP-DSP library involves many subtle rules—FFT table initialization, normalized frequency arguments, 16-byte buffer alignment, stateful filter delay lines, and C++-only matrix/EKF classes. This Skill grounds AI code generation in the real esp-dsp repository so the generated ESP-IDF code uses correct APIs, call chains, and Kconfig settings instead of invented functions. ## Core Features & Use Cases - Scenario Recipes: 15 step-by-step recipes covering project setup, complex/real FFT, windows, DCT, FIR/IIR filters, resamplers, vector math, matrices, 2D convolution, Kalman EKF, and real-time streaming audio (sc16 spectrum and IIR effects chains). - Real API Reference: Function signatures, structs, error codes, and Kconfig options extracted from the actual esp-dsp headers, plus a pitfalls list of 17 common mistakes with wrong/right code pairs. - Use Case: Ask for a 1024-point FFT spectrum on ESP32-S3 and receive a complete app_main with dsps_fft2r_init_fc32, windowing, bit-reverse, power-spectrum conversion, and the correct idf.py build commands. ## Quick Start Ask the AI to generate an ESP-IDF project that computes a windowed FFT spectrum of a test tone on ESP32-S3 using the esp-dsp component.

Frequently Asked Questions about esp-dsp-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute an FFT on ESP32 with the esp-dsp library?

Call dsps_fft2r_init_fc32(NULL, CONFIG_DSP_MAX_FFT_SIZE) once, fill an interleaved Re/Im float buffer of length 2*N, then call dsps_fft2r_fc32 followed by dsps_bit_rev_fc32. N must be a power of two and no larger than the configured maximum FFT size.

How do I design an IIR biquad filter with esp-dsp?

Generate coefficients with a generator such as dsps_biquad_gen_lpf_f32, where freq is normalized to the sample rate in the range 0 to 0.5, then filter blocks with dsps_biquad_f32. Keep the delay line w[] persistent across blocks to avoid clicks.

Which ESP32 chips have optimized esp-dsp assembly paths?

ESP32 (_ae32), ESP32-S3 (_aes3), ESP32-P4 (_arp4), and ESP32-S31 have optimized implementations selected via CONFIG_DSP_OPTIMIZED. Other targets like ESP32-C3 or ESP32-S2 automatically fall back to portable ANSI C.

Why does my esp-dsp FFT return ESP_ERR_DSP_UNINITIALIZED?

The FFT module requires explicit initialization before use; there is no global esp_dsp_init. Call dsps_fft2r_init_fc32 (or dsps_fft2r_init_sc16 for fixed-point) once before any FFT call, and check the returned esp_err_t.

Can I use dspm::Mat and the Kalman filter from C code?

No, the dspm::Mat matrix class and the ekf_imu13states Kalman filter are C++-only. Put that code in a .cpp file, include esp_dsp.h plus ekf_imu13states.h, and declare app_main with extern "C" linkage.

When should I not use the esp-dsp library?

ESP-DSP is an ESP-IDF component, so it does not fit bare-metal non-IDF builds, I2S/audio driver configuration itself, or neural-network inference. For inference use ESP-DL or TensorFlow Lite Micro instead.