# CircuitPython adds USB host audio support for ESP32-P4 microphone recording

> **Key takeaway:** The new usb_host_audio module in CircuitPython enables ESP32-P4 microcontrollers to interface with USB microphones for real-time audio recording and visualization.

**Published:** 2026-11-25T20:35:23+00:00 
**Source:** Adafruit Electronics 
**Category:** open-hardware 
**Canonical URL:** https://fosswire.org/news/circuitpython-adds-usb-host-audio-support-for-esp32-p4-micro.html 

## Summary
CircuitPython has introduced a new usb_host_audio module via pull request #11547, providing the capability to support USB host microphones. This update allows microcontrollers with USB host capabilities to capture audio data directly from external USB peripherals.

Adafruit has demonstrated this functionality using the Metro ESP32-P4 development board paired with a 5-inch Raspberry Pi Touch Display 2. The implementation includes a graphical user interface that provides real-time waveform visualization and level metering, with the ability to save captured audio as .WAV files to an SD card.

## Technical implementation of usb_host_audio
- **New Module:** The usb_host_audio module enables CircuitPython to act as a USB host for audio-class devices.
- **Hardware Integration:** The project utilizes the ESP32-P4 SoC to drive both the USB host interface and a high-resolution graphical display.
- **Data Handling:** Audio input is processed for real-time visualization (waveforms and level meters) and persisted to local storage via SD card in the .WAV format.
- **User Interface:** The system implements touch-based controls on a Raspberry Pi Touch Display 2 to manage recording states.

## Why it matters
This development expands the utility of the ESP32-P4 in the maker and embedded prototyping space, particularly for audio-centric IoT devices. By adding USB host audio to CircuitPython, developers can more easily integrate standard USB peripherals into low-power embedded projects without writing complex low-level drivers.