AI story box
At its heart, the Story-Box uses a PN532 NFC reader to detect cards. Each card has an ndef record to a Spotify playlist, a YouTube link, or a custom “story” tag. When the box reads a tag, it launches the corresponding audio path.
You can think of it as an AI version the tony box or any of the old song boxes that kids had years ago. This is a modern take on existing ideas.
Under the hood, it’s powered by:
A Raspberry Pi Zero W2 running a Python service at startup (was going to use an ESP32 or C3 but their wifi is slow for download)
A PN532 NFC reader connected over I²C
NeoPixel LEDs that pulse and glow along with playback
A hardware volume knob wired to a GPIO analog interface
Local and cloud audio: pydub + simpleaudio for local playback, and ElevenLabs or OpenAI TTS for generated voices
Features
Play music or stories by tapping an NFC card
Generate new bedtime stories using ChatGPT
Read them aloud with natural-sounding ElevenLabs voices
LED feedback that reacts to the story or track
Volume knob for simple, child-friendly control
Wi-Fi captive portal setup for easy configuration
Web dashboard (planned) to manage cards, lights, and playback
The project originally began as a simple “music box for kids,” but it quickly evolved into a creative sandbox — a blend of storytelling, electronics, and AI.
Hardware and Design
The enclosure is a 100 mm × 100 mm 3D-printed shell, compact enough to sit on a nightstand. Inside, everything’s wired around the Raspberry Pi Zero W2.
Each card is just a cheap NFC tag with a printed label. You can make your own “library” of cards — Bedtime Stories, Lullabies, etc… I designed the whole thing around the idea of putting NFC tags into 3D prints or you can scan an Amiibo.
Software Overview
The core service (story_box.py) listens for NFC scans, reads the URL payload, and routes it through the appropriate handler:
Spotify / YouTube URLs → play via a local audio service
Story tags → call ChatGPT API to generate a short story
TTS mode → use ElevenLabs API for expressive narration or ChatGPT TTS for a faster cheaper option
LED controller → sync light animations to playback status
Everything is written in Python, and the environment is lightweight enough to boot automatically when the Pi powers on.
Future Plans
The to-do list keeps growing, but here’s what’s coming next:
A simple local web interface for adding and managing stories
Expanded LED animations tied to story mood (calm, dramatic, funny)
Offline mode, caching stories and voices for travel
Wi-Fi captive portal onboarding, so you can set up the box from your phone