A tiny onboard microphone
A 3.50 × 2.65 × 0.98 mm surface-mount (SMT) PDM microphone feeds the ESP32-S3.
A desktop AI companion prototype: speak to a custom audio board and hear an AI reply.
Functional prototype · Local AI processing · LinkedIn may require sign-in
01 / How it works
The ESP32-S3 handles audio. A local computer handles speech recognition, AI replies and speech synthesis.
A 3.50 × 2.65 × 0.98 mm surface-mount (SMT) PDM microphone feeds the ESP32-S3.
Speech becomes text, then an AI reply, then spoken audio. The project includes Whisper recognition and Piper speech output.
The ESP32-S3 sends returned audio over I2S to the MAX98357A amplifier and speaker.
02 / The engineering challenge
The low-cost microphone needed signal conditioning before recognition.
The inexpensive microphone kept the board compact and affordable, but its raw audio was not a strong input for transcription.
We removed DC offset and applied controlled digital gain based on average signal energy.
Quiet speech reaches the recognizer at a more useful level. Recognition accuracy still depends on the recording.
Firmware measures offset, peak, root-mean-square (RMS) energy and clipped samples. It centers the waveform, calculates gain from RMS energy and limits that gain to 16×. Using average energy prevents a single full-scale sample from suppressing amplification of an otherwise quiet recording.
The output stays within the supported sample range. The live recognition path also rejects near-silent input. This processing adjusts offset and level; it does not remove background noise. No measured transcription-accuracy improvement is claimed.
03 / Custom hardware
USB-C data and rechargeable power are integrated on the audio board.
Native USB supports firmware programming, debug access and device communication. A separate UART header provides recovery access.
The BQ24074 handles battery charging and system power-path management. Firmware monitors battery voltage and charger status.
USB data passes through ESD protection and series resistors to the ESP32-S3. The 12 Mbit/s figure is the USB signaling rate; application throughput depends on implementation.
The charger manages a single-cell rechargeable battery and the system supply. An AP2112K regulator provides 3.3 V to the MCU and microphone; the system rail also powers the speaker amplifier. Battery runtime and charge performance require measurements on the assembled hardware.
04 / Beyond the demo
Test microphone capture, speaker playback, battery voltage and charger status.
Update the application wirelessly, with wired USB and UART access available for service.
The microphone and amplifier turn off while Wi-Fi and USB remain available.
This is a functional prototype. Repository records include firmware readback, connected-idle checks and diagnostic playback on physical hardware. They do not establish production readiness, measured battery runtime or complete physical conversation acceptance.
The ESP32-S3 module provides 16 MB flash and 8 MB PSRAM. Speech and AI processing run on the local computer and can operate offline after the required software and models are installed.
Engineering for clients in the United States
Laztronics provides custom PCB design, ESP32 firmware development and local AI software integration. We bring microphone capture, speaker output, USB-C interfaces and battery charging circuitry together in one prototype.