Building a Personal AI Podcast for My Kids
Use agents to build the system, use code to run it, and why the AI call was the smallest part of the project.

Every Friday, my home server writes a podcast for my kids
Every Friday afternoon, a home server generates two custom podcast episodes for my kids: one for my oldest (11) and one for my youngest (6). By early evening, each show is voiced, mixed with sound effects, uploaded to Google Drive, and emailed to me for review. Once approved, the boys get a personalised 15-minute show tailored to their week: recent school events, family activities, personal interests and, importantly, interactive educational concepts in a language they understand and appreciate.
How it started
We spend a lot of time in the car with the kids, and they need entertainment, all kids do! We talk to them, ask about school, and put on podcast shows like Kids Science Weekly or The Week Junior and so on. Those podcasts are great and well produced, but they aren't personalised and the kids soon get bored. At the same time, we noticed that our oldest absorbs information remarkably fast when listening to audio stories at night without classroom distractions, so I wanted to tap into that without adding more screen time.
Given my work at Oracle (building agentic UIs, scanning code with Codex agents, and using spec-driven generation) I wondered: what if we used AI to generate our own podcast? Feed the system context about school, scouts and family plans, weave in some educational concepts, and let's see what happens.
After running this pipeline for 6–8 weeks, the verdict is clear: they love it.
What surprised me most is that we, as parents, remain fascinated by how the LLM pieces together disparate contexts and weaves bite-sized educational lessons into cohesive stories. Even though I built the pipeline and know precisely how it works and what context goes in, it still catches me off guard, and I get a "wow, it did that" moment when listening to it.
One of my youngest son's episodes opened like this:
"So, I heard that Year One had some very special visitors. Actors came into your history lessons, and they brought toys. Not new toys, old toys, and did you know lots of those old toys were made of wood, not plastic. If you've been looking at materials you'll know wood is hard and it's strong... But if you drop a wooden horse it goes 'clunk' and not 'boing'. So here's my first question for you. If you were making a toy today out of wood, with no batteries allowed, what would you make?"
The show then paused for five seconds to give him time to think.
That opening synthesised three separate inputs: a school email about a history visit, the national curriculum entry stating Year 1 children are learning about materials, and the show's format rule to prompt the child with a question. The model wasn't explicitly told to link these items; it organically wove them into a single narrative. That's a wow moment.
Very little of this project was the AI API call. It's a pipeline, and this post details why I built it, how the architecture works, and what I learned along the way. Many of these lessons are ones I am using at work today to make us better AI engineers.
Listen to an episode
It's hard to demo this, but the easiest demo is a sample episode. Here is my oldest son's episode from 20 November (about 11 minutes). It takes him down 76 steps into the Battle of Britain bunker at Uxbridge, which he had visited with us (that visit came straight from the shared family calendar), to show how the plotters used mental arithmetic to track incoming aircraft. It then flies off to the Airbus A380, his favourite plane, to estimate its wingspan in double-decker buses, with a trick for the nine times table and a factor puzzle along the way.
Here is how it starts:
"Hello. Welcome back. Put your feet up, or wander about the room if that helps your brain think, because today we are going underground, then up into the sky..."
A few minutes later comes the personal touch:
"You know this room, because you were standing in it. The bunker at Uxbridge."
How does it work?
Overview
The solution is a custom, Docker-based pipeline written in Python consisting of four main stages:
- Ingest: Scheduled jobs pull data from various sources throughout the week and store it in a Postgres database.
- Context: At the end of the week, a job queries the database to extract a "context window" of recent and upcoming events for each child.
- Script: Claude processes a detailed prompt alongside the context to generate the script.
- Render: OpenAI handles text-to-speech narration, ElevenLabs generates sound effects, and ffmpeg mixes the final audio for review via Google Drive and email.
The stack is deliberately lightweight: Python, Postgres, Docker Compose, and cron. The renderer relies solely on the Python standard library and ffmpeg.
Getting the right data
Contextual data makes or breaks the show; that's one important lesson I learnt. I mapped out nine primary data sources for the pipeline:
- School emails: Weekly updates on classroom activities, including PDF attachments.
- Cubs and Scouts emails: Activity schedules and badge progress updates.
- Scouts blog: Public Blogger posts with local news and upcoming events.
- School website: Announcements and class updates posted online.
- Shared family calendar: A Google Calendar logging activities like visiting a local WW2 bunker or attending a birthday party.
- National Curriculum: Coarse-grained academic targets used to align stories with current school subjects.
- Kids' news feeds: Curated RSS feeds from children's news outlets (via the Guardian's Newswise list).
- Points of interest: Reverse-geocoded location data via Home Assistant and a self-hosted OpenStreetMap engine, converting location traces into recognisable place names (e.g. local landmarks).
- Custom parent notes: High-priority direct entries submitted via a custom parent portal.
For ingestion, scheduled tasks fetch these inputs and save them as tagged "snippets" in Postgres. Each source is implemented against a fixed handler interface, making it easy to add or adjust sources over time.
Generating the context
A read-only HTTP endpoint returns everything relevant to a specific child within a rolling window. By default that's the past 10 days and the next 7 days, which is what I've chosen and it works well. It also includes term schedules and source health status. Because snippets are tagged by child during ingestion, the podcast generator calls this API once per child to collect all the necessary background material.
Generating the script
On Friday afternoon, the generator fetches the context window and prompts Claude to draft a script. The prompt defines explicit structural rules: sound effect placement, pause duration, topic count, a 15-minute target runtime, and overall tone guidance (educational and engaging).
Giving it a voice: OpenAI speech and ElevenLabs sound effects
The generator produces a script using a lightweight markup syntax where every line is classified into one of four types: sound effects, pauses, spacing, or narration.
[SFX: intro_jingle]
Hello [name]! Welcome back.
[PAUSE: 5]
A dedicated parser turns the raw text into typed segments before handing them to the rendering engine.
Narration with OpenAI
Narration text is sent to OpenAI's speech endpoint using gpt-4o-mini-tts. It accepts plain-English delivery instructions alongside the text. Our prompt specifies: "Warm, curious British-English narrator for an eleven-year-old. Adventurous and intelligent, with clear pacing; never babyish, shouty, or overly theatrical."
We use the "marin" voice at 0.93 speed. Voice profiles, speeds, and delivery instructions are fully configurable per child. I chose 0.93 because I wanted to slow the speech down a bit to allow the kids to absorb the information. Moving forward, I'm planning to let each kid choose their own voice and speed. I did also look at ElevenLabs voices, and they are amazing, but they were much more expensive than OpenAI's voices, so for a prototype I decided to go with OpenAI for now. I may change this later.
Because the API limits characters per request, text is split along paragraph, sentence, and word boundaries. Temporary network failures and rate limits trigger retries, while unrecoverable errors halt generation to prevent incomplete outputs.
Sound effects with ElevenLabs
Sound effects are generated via ElevenLabs' text-to-sound API. The show maintains a fixed vocabulary of around twenty named sounds mapped to natural-language descriptions. For instance, thinking_hum maps to "a soft curious musical hum while a puzzle is posed", and page_turn maps to "a page of a book or atlas turning". The intro and outro jingles use longer prompts describing a xylophone-and-ukulele theme.
Audio clips are cached locally using a hash of the prompt string, duration, and settings. Updating a description alters the hash, triggering a new fetch automatically while avoiding obsolete files. As a result, standard effects are almost always served from cache (only 21 new characters were sent to ElevenLabs last week).
The model can also request ad-hoc sound effects outside the primary vocabulary using inline descriptions: [SFX: volcano_rumble | a deep rumbling volcano about to erupt]. To maintain stability, custom requests are capped at three per episode, vocabulary overrides are disallowed, and malformed cues are dropped automatically.
Audio mixing
ffmpeg normalises and mixes the audio components using the following parameters:
| Audio component | Processing and target format |
|---|---|
| Speech and FX | Decoded to a uniform format; loudness normalised to -16 LUFS |
| Sound effects | Level ducked slightly below narration; short fades applied to eliminate clicks |
| Pauses | Explicit silent segments inserted based on cue timing |
| Output file | Encoded as 128 kbps MP3 via atomic write (renamed upon completion) |
Unit and integration tests run against a local mock HTTP server using real ffmpeg commands on generated test tones, avoiding external API dependencies and live keys.
Delivery and review
The fully rendered and mixed MP3 files and transcripts are then uploaded to Google Drive using a restricted drive.file scope. An email notification then delivers the transcript and direct playback links to the parents (me!). Having a human review step remains essential. Even with robust system prompts, I feel you must have explicit verification to ensure the model's output remains fully appropriate before my kids listen.
Observability: "You don't plan for failure, the universe will plan it for you, and usually at 3 a.m."
That's a quote from a friend of mine at Oracle, Beilei Wang, who said it during a conference, and it's stuck in my mind since. To keep this system healthy, I made sure everything is observable, with sufficient telemetry so I can diagnose issues. System health is tracked via a dedicated parent portal containing monitoring dashboards and regular health checks. As outlined in the lessons below, proactive monitoring proved critical. The first integration issue presented as a subtle degradation in context quality rather than an explicit code error, and I wouldn't have caught it without good observability.
Why a code pipeline beats an agent with a prompt
Use agents to build the system, and use code to run it.
Once I built the system, I sat back and thought: hang on, could an alternative implementation pattern have been to give an autonomous AI agent access to my Gmail, Google Calendar, text-to-speech tools, and Google Drive alongside a high-level system prompt ("Read the boys' week and create a podcast") and let it rock and roll?
While that pattern works well for rapid prototyping, and I did use it for prototyping, this production pipeline uses deterministic code for execution, confining the language model strictly to text generation without tool access. That's incredibly important, and something we shouldn't forget in this new age of AI engineering.
Key architectural reasons for this separation include:
- Enforced privacy boundaries: Privacy logic is enforced by code rather than prompt compliance. For example, location data is only ingested on weekends and school holidays, via explicit calendar checks in the ingestion handler. I do this because I don't want the podcast to mention places I've been to during the week while the kids are at school. The ingestion code simply does not run on school days, so the data is never collected. If there is no data, the LLM can't use it in the podcast.
- Untrusted data isolation: Context payloads contain roughly 40,000 tokens derived from external sources (emails, web pages, RSS feeds). Passing untrusted text to an agent with live credentials creates prompt injection risks (e.g. embedded instructions attempting to override system behaviour). Running the execution layer via isolated CLI calls with tool execution disabled ensures malicious inputs cannot trigger unauthorised operations.
- Testability: Deterministic execution allows comprehensive test coverage (we ended up with 559 unit tests). The test suites verify data tagging, malformed cue handling, and upload failures directly: guarantees that cannot easily be asserted against autonomous agent behaviour.
- Clear error visibility: Source operations are logged independently. If an upstream integration fails, health monitors raise explicit alerts for me to review. Autonomous agents presented with missing inputs often default to generating generic output, obscuring the underlying infrastructure failure, and that's not great. The kids will then say "Dad, the podcast is rubbish".
- Predictable operational costs: Oh, this one is important. The pipeline executes fixed, single-pass tasks in code. Ingestion runs on fixed schedules, podcast generation (where I call the LLM) is invoked only once per child, and assets are cached locally. Conversely, tool-using agents re-read inputs and re-plan workflows iteratively, increasing token consumption in unpredictable ways. You have very little control over what the LLM is going to do; it's non-deterministic and can, and will, change between model upgrades.
- Modular architecture: Components can be updated independently. Switching model APIs, updating data handlers, or modifying storage targets requires zero changes to adjacent pipeline stages, which makes the solution pluggable and ready for change. A good architecture is one that can adapt to change without needing a complete re-architecture.
Agents remain ideal for system design and initial construction, but operational execution benefits from deterministic software boundaries.
How I built it: a spec-first approach with Claude Code and Superpowers
The repository was built using a strict spec-driven development model. Code generation was only permitted after drafting, reviewing, and approving an explicit specification file within the specs/ directory. For spec generation I used the Superpowers skills for the spec-driven development methodology. Recently I've been looking at OpenSpec and Spec Kit, and I really like the Google Elephant Goldfish Model, but I am quite fond of Superpowers, especially its test-driven development approach.
When operational requirements changed, specifications were updated before the code. For example, the YouTube ingestion spec was updated to document its eventual removal after verifying that watch history APIs were no longer available for supervised accounts. Similarly, generator specifications were updated to record the structural transition from direct API calls to local CLI execution.
Complex components used the Superpowers development skills integrated into Claude Code:
- Specification: Human review and approval of component constraints, data boundaries, storage models, and interfaces.
- Planning: Automated translation of specs into granular implementation plans detailing file structures, dependency requirements, and unit tests.
- Execution: Task-by-task implementation using isolated sub-agents following test-driven development guidelines.
The renderer pipeline (OpenAI integration, ElevenLabs caching, audio mixing, notification dispatch, and scheduled triggers) was built in a single day across roughly twenty commits using this structure. Clear initial specifications eliminated architectural ambiguity during code generation.
Development metrics
| Metric | Count |
|---|---|
| Commits | 102 |
| Specifications | 23 specs (~45,000 words) |
| Codebase size | ~17,800 lines of Python |
| Test suite | 559 unit tests |
While coding agents generated the majority of the implementation files across concurrent git worktrees, human oversight was focused on core system design:
- Defining operational boundaries: Determining data retention rules, privacy constraints, and cost limits.
- Drafting specifications: Writing clear technical contracts to eliminate agent guesswork.
- Reviewing output: Verifying implementation logic against system constraints and rejecting unnecessary complexity.
Clear specifications remain the primary leverage point when using automated coding tools.
Lessons learned
These are the lessons I learnt along the way, and I am applying the concepts to what we do at work.
Context assembly dominates development
Output quality depends directly on context quality. Sparse inputs produce generic content, while rich context yields specific details ("your history walk is on Tuesday"). The primary engineering effort involved organising context effectively: tagging snippets per child, scoping data windows to prevent leakage between children, and indexing upcoming events.
In the work context (no pun intended), think about the inputs to the LLM. Is it enough? Is it too much? Does the LLM have the right amount of information to make a reasoned decision? Remember the old saying, GIGO: garbage in, garbage out.
Parents are the highest-value data source
Scraped inputs provide baseline structure, but direct human input offers the highest narrative value. Through the parent portal, we enter targeted notes using structured types:
- Fact: Specific events ("[name] got a new bike").
- Focus: Target themes ("emphasise space and physical science").
- Avoid: Topics to exclude entirely.
Structured avoidance rules are evaluated directly by the generator as strict system constraints rather than relying on probabilistic model interpretation.
Explicitly handle missing inputs
Context payloads pass source health flags to the model. If an ingestion source fails, the system prompt instructs the model to rely on standard baseline interests rather than inferring missing schedules. Providing explicit health states prevents models from fabricating events when inputs are absent.
Define strict structural contracts
Parsing logic is strictly decoupled from creative prompt tuning. Structural cues (e.g. bracketed directives like [PAUSE: 5]) are parsed programmatically. If the model emits a malformed cue (such as [Sound effect: door]), the parser silently drops the invalid line and logs a warning, preventing raw markup from being read aloud by the text-to-speech engine.
Operational observability is essential
Unmonitored background tasks degrade silently. For instance, short-lived OAuth credentials can expire without triggering immediate system crashes, leading to reduced context quality if ingestion steps fail. Comprehensive logging, token expiry tracking, daily health reports, and local dry-run modes (which dump generated prompts to disk for cost-free verification) ensure long-term stability.
What I'd do differently
- Start with a minimal set of data sources: The school inbox, shared calendar, and direct parent notes account for the majority of usable content. The additional sources I've added are nice, but most of the value comes from that initial set.
- Implement core infrastructure early: Production deployment settings, authentication token tracking, and alert monitoring should be established at the start of the project rather than reactively after pipeline failures. This was a lesson learnt.
- Apply structured planning workflows universally: Standardising design plans across all components speeds up development and reduces refactoring cycles. I spent many cycles going back and forth because I didn't plan properly. Claude was more than happy to help me out, and eagerly led me into those cycles. As my colleague says, "AI is eager to please!"
- Design for cross-episode state persistence: Maintaining state across episodes allows the system to reference prior topics or follow up on previous questions, preventing topic repetition across adjacent weeks. Because we, as parents, sometimes forget to add more contextual data, and because I pull data from 10 days back and 7 days forward, it has once repeated the same story two weeks in a row. What I need to do is implement episodic memory so each podcast knows what the previous one covered and doesn't repeat the same storylines. To do this, I will get the LLM to also produce a very short summary of each episode's themes, so the context is kept as small as possible.
- Abstract configuration parameters from the outset: Moving environment settings, school schedules, and user profiles into external configuration files simplifies multi-user deployments. I want to open this up to other kids in my network, with different ages, listening speeds, voices and so on.
Future roadmap
- Cross-episode memory: Persistent tracking across episodes to enable multi-week narrative arcs and follow-up questions.
- Voice input support: Allowing children, or us parents, to record short voice updates to be transcribed and ingested into the context window. I was thinking of adding an Alexa skill for this, or maybe a Home Assistant action.
- Automated content safety evaluation: Adding an automated validation step to assist human review before audio distribution.
- Smart speaker and mobile podcast app integration: Currently the episodes end up on my Google Drive, and it's up to me or my wife to click the link to play them. The next feature is to expose the podcast through the normal podcast channels (Apple Podcasts and so on). These won't be public podcasts but private ones, and each kid will have their own URL. This will be a good one to test out the Google Elephant Goldfish Model.
Summary recommendations for engineering teams
- Focus on context engineering: The main value lies in context assembly, system constraints, cost management, and privacy enforcement rather than the raw model API call.
- Treat external context as untrusted: Restrict tool access for generation tasks and isolate model execution.
- Decouple generation from execution: Use AI models where narrative flexibility is required, but use deterministic code to enforce system reliability.
- Maintain strict specifications: Clear specification files serve as the primary source of truth when relying on automated code generation tools.
Hope you enjoyed the read. This is still an evolving project, and if you have questions feel free to reach out to me. As people who know me will say, "Angelo is always happy to talk, chat and brainstorm with anyone!"