The ESP-SDR project published a way to interact with undocumented functionality in many ESP32 chips that allows reading raw I/Q data. I/Q stands for In-Phase and Quadrature. It’s a digitized arithmetic representation of radio signals captured over time. This page has a more detailed explanation of I/Q data with helpful graphics if you’d like to dive deeper on the subject.
This project runs the ESP-SDR firmware on the ESP32-C6 co-processor on the Metro ESP32-P4. The P4 itself runs CircuitPython and communicates to the C6 via UART. The C6 runs Fast Fourier Transform on the signal data and provides stats to the CircuitPython side to plot the waterfall visualization.
There are guide pages that walk you through flashing the C6 and loading your Metro P4 to run the waterfall project.
Read more at ESP-SDR on Metro ESP32-P4