A self-hosted, local-network voice companion for the StackChan ESP32-S3 robot. No cloud: the little robot on your desk wakes when called, hears you, thinks, and speaks back — all on hardware you own.
The name is the witch's-companion kind: a familiar is a spirit bound to a person. This repo holds the two halves of ours.
📖 Full user guide: QUICKSTART in-repo, or the
docs site — quickstart, day-to-day usage, and deep dives on both
halves. The site is Hugo-built; preview it locally with
hugo server --source docs.
Say "be a cat" — or bat, toad, fox — and the face changes, persisting across reboots. These are the actual sprite skins the firmware renders on the 320×240 display, driven by the same blink/speaking animation system as the default face:
| "be a cat" | "be a bat" |
|---|---|
| "be a toad" | "be a fox" |
(The art is generated by poppet/main/assets/familiars/gen_familiars.py; a
procedural default face ships too.)
familiar/
├─ poppet/ # the firmware — the little body that sits on your desk
│ # (M5Stack StackChan app on a vendored xiaozhi-esp32 fork,
│ # committed in-tree at poppet/vendor/stackchan-esp32/)
├─ grimoire/ # the backend — hears (whisper), thinks (LLM), speaks (Kokoro)
│ # Go server, deployed as a container
└─ docs/ # project docs — also a GitHub Pages site (Hugo)
├─ _index.md # user-guide landing page (site home)
├─ QUICKSTART.md # clean clone → a talking familiar
├─ using.md # day-to-day guide: wake word, commands, familiars
├─ poppet.md # deep dive: the firmware (the body)
├─ grimoire.md # deep dive: the server (the mind)
├─ PROTOCOL_V2.md # the live v2 contract both halves implement
├─ WAKE_WORD.md # training + flashing the custom wake word
├─ sources.md # lineage — the ancestor projects familiar descends from
└─ archive/
└─ PROTOCOL_V1.md # the retired v1 wire protocol (historical)
- poppet/ — firmware. Build with ESP-IDF v5.5.4; run
python3 fetch_repos.pyfirst to pull the component libraries (mooncake, smooth_ui_toolkit, ArduinoJson, esp-now). See poppet/BUILD.md. - grimoire/ — Go backend.
make build(needs the whisper.cpp submodule). See grimoire/README.md.
git clone https://github.com/TaraTheStar/familiar.git
cd familiar
git submodule update --init --recursive # pulls whisper.cpp for grimoire
Both halves were extracted from earlier standalone repos (StackChan and
go-stackend) as a fresh-start snapshot; their pre-monorepo history lives in
those archives.
familiar is dual-licensed by subtree:
grimoire/(the backend, original work) — GNU AGPL v3.0-or-later (grimoire/LICENSE). Note §13: running a modified grimoire as a network service obliges you to offer users its source.- everything else (
poppet/,docs/, tooling) — MIT (LICENSE).
grimoire and poppet are separate programs talking over a socket, so the AGPL does not extend across the wire to the MIT firmware.
It stands on a lot of other people's work — poppet in particular is largely a derivative, not original code. With gratitude to:
Firmware (poppet)
- m5stack/StackChan — the StackChan
robot and the base app
poppet/main/is built from. - BrettKinny/StackChan — the fork
whose firmware work (
dotty/ firmware branches) poppet derives from. - 78/xiaozhi-esp32 @ v2.2.4 — the AI
firmware base our in-tree fork at
poppet/vendor/stackchan-esp32/derives from (MIT, © 2025 Shenzhen Xinzhi Future Technology Co., Ltd. and Project Contributors). - Bosch Sensortec BMI270 SensorAPI
under
poppet/main/hal/drivers/bmi270/(BSD-3-Clause, © 2023 Bosch Sensortec GmbH). - Components fetched by
poppet/fetch_repos.py: mooncake, mooncake_log, and smooth_ui_toolkit (Forairaaaaa); ArduinoJson (MIT); esp-now (Espressif, Apache-2.0).
Backend (grimoire)
- ggerganov/whisper.cpp — on-device ASR (MIT, © 2023-2026 The ggml authors), vendored as a submodule.
- Kokoro / kokoro-fastapi — TTS.
- An OpenAI-compatible LLM served via llama-swap (e.g. Google's Gemma, under the Gemma Terms of Use).
Each upstream remains under its own license; this repo retains their copyright and license notices where their code is included.