bot-reborn: Build a Voice-AI ESP32-S3 Robot From Scratch
The reflex server log: after a 3.6 s first call that loads the model, each request answers in 203–220 ms.
- ESP32-S3 dev board
- INMP441 I2S microphone
- MAX98357A I2S amplifier
- Speaker
- Small SPI screen
- MPU-6050 (optional, I2C)
- Toy car (optional, for the toy-on-wheels body)
What you will build and why it is useful
bot-reborn is a workbench for voice-AI robots. The intelligence lives in a small Node server on your computer — the brain — and the robot is just a body that hears, speaks and moves. You configure a character (its persona, its providers, its body) in a local admin page, and the same brain can drive more than one robot.
Three gadgets have already been built on the platform:
- A desk companion that talks back. An ESP32-S3, a microphone, an amp and a speaker on a breadboard, with a screen for a face.
- A toy car that drives on a spoken command. A cheap toy, a phone as its body, and a reflex model that answers a move in about 200 ms.
- A pet on a screen. It sits, shakes a paw and lies back down when nobody talks to it.
There is also a route that needs no parts at all. The wiring simulator runs in your browser at /sim/ on the brain's own machine, so your first hour of building costs nothing — a mistake burns a virtual part, not a real one. That makes this a good project if you want to learn how a voice assistant is actually assembled before you spend money on a microphone and an amp.
\2
\2
\2What you need
Hardware for the real body (all named in the README):
- An ESP32-S3 dev board.
- An INMP441 microphone.
- A MAX98357A amp and a speaker.
- A small SPI screen for the face.
- A USB cable, and Chrome or Edge on the computer you flash from.
- Optional: an MPU-6050 on I²C, and a toy car if you want the toy-on-wheels body.
Pin tables live in firmware/README.md under the wiring section — check them there rather than guessing, since the firmware only implements the original body.
Software:
- Node 20.19+ or 22.12+ on a computer that sits on the same Wi-Fi as the robot.
- API keys for speech-to-text, a chat model and text-to-speech. Ears, mind and voice each take any OpenAI-compatible provider, and the admin page ships presets and tests each key as you type it.
- Optionally, a local decision model served at an endpoint if you want the reflex layer.
You do not need ESP-IDF. The README is explicit that the board setup writes the firmware, the Wi-Fi credentials and the character's token for you. Note that macOS is what the project has been walked through on; Windows is untested.
Typical use cases
An ESP32-S3 with a mic, amp, speaker and a small screen for a face that answers you out loud.
Set the toy-on-wheels body, wire four motor inputs on GPIO 4–7, and steer with spoken commands.
Use the browser simulator to build the audio circuit hole by hole before spending a cent.
Edit actions as JSON or drop in a body plugin to give the same brain a new set of verbs.
How it works: one brain, four layers
The brain is split into four layers, each with its own provider and key:
- Ears — speech to text.
- Mind — the chat model plus the persona that decides who the character is and how it talks, in any language.
- Voice — text to speech.
- Reflex — optionally, a decision model you supply and serve yourself.
Reflex is the interesting one. It sees each line before the chat model and picks a single action — stop, forward, backward, left, right, keep_going — or pass, which hands the turn to the chat model. It answers with a probability rather than text, which is why it can be fast: no voice in the reply, only the action. The example model is a 0.8B model that answers about 200 ms after the transcript on a Mac mini M4, and scores 86.6% on its test set (142 of 164). A move only fires above 0.8 confidence, so anything uncertain falls through to the slower chat model — getting a reflex wrong is worse than getting it late.
Keys stay on the computer in a file under ~/.bot-reborn/ that only your user can read, and are sent only to the providers you chose. The robot never sees them: it holds a token that says which character it is.
A body is a template, not firmware and not the character. There are five in core/bodies.js: voice only, a pet on a screen, a tarot reader, a toy on wheels, and a dry run kept out of the picker.
Build and flash: start with no parts
- Start the brain on a computer on the same Wi-Fi as the body.
npm install
npm run setup # the wake-word and VAD models, a Node check, one build
npm start
npm run setup tells you what is missing and how to fix it. The admin page opens in your browser: create a character, then fill Ears, Mind and Voice with a provider and key each.
-
Open the workbench at
http://localhost:8787/sim/, or use the link in the admin sidebar. It only opens on the computer the brain runs on. -
No keys yet? Open Projects, pick Audio only, then Shopping list. That is what to buy, with the spec to check on each listing and a rough price. Press Demo to watch it go together in about forty seconds, or Build it for me to leave the same bench standing and wire it up by hand.
-
With keys? Do the same with Audio only, then accept the token the status line offers. The console types it and reboots the board; once it says
welcomed as …, speak one sentence and listen for the answer. -
Real hardware. Open the admin page, plug the board into the port marked USB, and click Set up a board. Choose First time and it writes the firmware, the Wi-Fi and the character's token. The board finds the brain on its own.
One setting to change straight away: turn Barge-in off for this character. The body has no echo cancellation, so it would hear itself and interrupt itself.
Choosing a body and calibrating wheels
The admin's Body tab draws one card per template, showing the capabilities it has — hear, speak, show, move — the parts each body costs, and the actions the model may call.
| Template | Capabilities | Actions the model may call |
|---|---|---|
| Voice only | hear, speak | play_sound |
| Pet on a screen | hear, speak, show | pose, play_sound |
| Tarot reader | hear, speak, show | draw_card |
| Toy on wheels | hear, speak, move | move, cruise, stop, play_sound |
| Dry run | hear, speak, move | the toy's four, logged only |
A character with no body chosen is voice only. A body's actions are yours to edit — the Body tab holds them as JSON, and once you write your own the body keeps them instead of following the template. Nothing is compiled or flashed for that: an action is a program of the five verbs the hardware already answers (drive, halt, voice, pose, draw).
For the car, open the character's Body tab, set Toy on wheels, wire the four motor inputs (GPIO 4–7), and calibrate: cal drive if it goes backwards, cal steer if it turns the wrong way. The board stops the car within a second of losing the brain. Without wheels, open the admin with ?bench, go to the Body tab and set Dry run — the moves only reach the brain's log.
There is also a module system: installing a module from Body → Modules gives the model example actions that tell it when to use the module. Plug in USB to pair, say "turn on the light", and the bench LED lights. Only the LED module ships today, and installing again rewrites the commands, so a connected body must pair again afterwards.
Ideas to extend it, and honest limitations
Extend it:
- Write your own body plugin — one directory per body under
~/.bot-reborn/bodies/, each with abody.jsonnaming the parts, the GPIO pins the body may touch and the commands it runs. The brain reads them at startup and refuses a bad manifest with one line in the log. - Edit a body's actions JSON so the model calls your own verbs instead of the template's.
- Copy a character to make a second one — providers and keys come along, so a new persona is one page of work.
- Use the workbench's ten device families, bilingual five-stage lessons and fourteen guided projects to practise wiring before you commit to a parts order.
Limitations to know before you buy anything:
- The real firmware implements only the original body: the INMP441 microphone, the MAX98357A amp and speaker, a screen, four motor pins on GPIO 4–7, and the MPU-6050 on I²C. Everything else in the simulator's device table — OLED, servo, HC-SR04, BME280, WS2812, buttons — is something the workbench can teach and the board cannot run yet. Power modelling is USB only on real hardware.
- Plugin bodies are simulator-only for now. The firmware speaks protocol 2, so a plugin body is turned away from a real board.
pwmcommands answerunavailableon the bench, andi2candadcresources are refused when a plugin loads. - The example reflex model is English only. A command in another language should score low and fall through to the chat model, but the README says that is untested.
- The phone body (an Android phone plus an FT232H) still works but is not the direction of the project, and the README does not teach it —
docs/hardware.mddoes. - A character file has no version number, so an older brain reading a file written by a newer one silently drops keys it does not know and the body falls back to its template.
- Windows is untested.
bot-reborn is unusual in a good way: it treats the AI as a configurable brain and the robot as a swappable body, and it lets you rehearse the whole build in a browser first. The firmware is narrower than the simulator, so read the device table before ordering parts. If you want a talking ESP32-S3 with a real persona and local key storage, this is a well-documented path.
Sources
github.combeasaltfish/bot-reborn — repository & README bot-reborn.agentlenshq.comOfficial websiteFacts in this article come from the project's public README and GitHub metadata at the time of writing. Images belong to their respective owners and link back to the original source.



