Sonoff NSPanel by ITead - Smart Scene Wall Switch based on ESP32 and custom Nextion Touch Screen Panel Display (non-Pro variant)

Sounds like you are confusing the original “Sonoff NSPanel” which this thread is about with the “Sonoff NSPanel Pro”(?), as the former that is based on an Esspressif ESP32 does not have a built-in microphone but the latter that is based on Android OS does, (note that they are not based on the same platform components at all, as you might understand).

Or do you mean you soldering your own microphone to the original “Sonoff NSPanel” (which this thread is about)?

Anyway, the ESPHome does support Microphone Components if the hardware is already connected, see → Microphone Components — ESPHome

For a ESP32 development kit hardware with built-in microphone (and speaker) check out Espressif ESP32-S3-BOX-3 and the M5Stack Atom Echo.
ESP Home and ESP32 S3 Box? or for better hardware the Onju Voice (Google Nest Mini speaker replacement PCB with ESP32-S3):