Embedded, AI, IoT

A desktop AI companion prototype: speak to a custom audio board and hear an AI reply.

The experience
Hold to talk. Release to send. Listen to the response.
The build
Custom PCB, embedded firmware and local AI software.
The hardware
Onboard microphone, USB-C programming and battery charging.

Functional prototype · Local AI processing · LinkedIn may require sign-in

Desktop AI companion prototype: custom ESP32-S3 board, rechargeable battery and speaker held together in one hand.
The prototype: custom audio board, rechargeable battery and speaker.

01 / How it works

Voice in. AI processing. Voice out.

The ESP32-S3 handles audio. A local computer handles speech recognition, AI replies and speech synthesis.

Speech enters a PDM microphone, is captured by ESP32-S3, travels over Wi-Fi to the local processing server, returns over Wi-Fi to the same ESP32-S3, and plays through the MAX98357A amplifier and speaker.
One board, shown twice. Audio travels to and from the local host over Wi-Fi. Capture and playback happen in stages.
CAPTURE

A tiny onboard microphone

A 3.50 × 2.65 × 0.98 mm surface-mount (SMT) PDM microphone feeds the ESP32-S3.

PROCESS

AI on the local host

Speech becomes text, then an AI reply, then spoken audio. The project includes Whisper recognition and Piper speech output.

PLAY

A reply from the device

The ESP32-S3 sends returned audio over I2S to the MAX98357A amplifier and speaker.

System block diagram

Microphone to ESP32-S3, Wi-Fi to the local server, return to the same ESP32-S3, then output to the speaker.

02 / The engineering challenge

Better input for speech-to-text.

The low-cost microphone needed signal conditioning before recognition.

THE CHALLENGE

Weak raw recordings

The inexpensive microphone kept the board compact and affordable, but its raw audio was not a strong input for transcription.

THE CHANGE

Center and level the signal

We removed DC offset and applied controlled digital gain based on average signal energy.

THE PURPOSE

More consistent speech input

Quiet speech reaches the recognizer at a more useful level. Recognition accuracy still depends on the recording.

How the audio conditioning works

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

Built to program, charge and keep developing.

USB-C data and rechargeable power are integrated on the audio board.

USB-C communication & programming

Native USB supports firmware programming, debug access and device communication. A separate UART header provides recovery access.

USB Full Speed · 12 Mbit/sESD-protected data

Integrated battery charging

The BQ24074 handles battery charging and system power-path management. Firmware monitors battery voltage and charger status.

Rechargeable power3.3 V regulation

One connector. Separate data and power paths.

USB-C data connects through ESD protection to the ESP32-S3. USB-C power feeds the BQ24074 charger and system power path, connected to a rechargeable battery. The system rail powers the speaker amplifier and the AP2112K 3.3 V regulator; the regulator supplies the ESP32-S3 and microphone.
Simplified from the Rev 1 schematic. USB supports service access and power; the audio workflow uses Wi-Fi.

USB and power specifications

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

Tools for bring-up and iteration.

Browser diagnostics

Test microphone capture, speaker playback, battery voltage and charger status.

Wi-Fi firmware updates

Update the application wirelessly, with wired USB and UART access available for service.

Ready between turns

The microphone and amplifier turn off while Wi-Fi and USB remain available.

Prototype status and verification scope

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

Need a similar audio or AI prototype?

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.

Discuss a Similar Project