Inspiration

Bedtime is one of the few moments when parents and children truly connect — but finding stories that are both personal and meaningful can be hard. TaleWeaver was born from a desire to make that time special again, transforming nightly routines into a moment of bonding, reflection, and emotional growth.

Instead of generic fairy tales, we wanted to create stories that revolved around the child. Opening the doors to interactive and adaptive storytelling, allowing the child to shape their own story. By first learning about the child, and leveraging A.I. agents such as Google Gemini and ElevenLabs we were able to create an immersive and interactive experience where kids could better learn moral values.

Our inspiration came from wanting to blend A.I. creativity with human warmth. Harnessing A.I. responsibly to nurture younger generations, combating negative stimulants such as short form content.

What it does

TaleWeaver offers two storytelling experiences:

Interactive Mode: Children make meaningful choices at 1-3 decision points that branch the narrative. Choices are designed with educational intent - one option demonstrates positive values (growth-oriented) while alternatives present valid but less ideal paths. This gentle approach teaches without punishment, encouraging reflection on consequences.

Non-Interactive Mode: Continuous narrative experience (1-3 minutes) perfect for younger children or bedtime winding down.

Every story is:

  • Age-customized with appropriate vocabulary (4-6, 7-9, 10-12 age groups)
  • Personalized to the child's name and interests
  • Focused on a chosen moral value (kindness, honesty, courage, sharing, perseverance)
  • Narrated with emotion-aware voice modulation

TaleWeaver then generates a story using Gemini, complete with an A/B choice that lets kids guide their story. Voice narration is implemented through ElevenLabs, where a warm storyteller voice or even a parent’s cloned voice is used. Then Gemini produces a reflection of the story analyzing the kids choices, reinforcing empathy and teaching emotional intelligence.

TaleWeaver's song and rhyming feature also allows for a parent to create a short lullaby/song about their child that revolves around the inputted characteristics. Then through ElevenLabs Music API a fun, personalized lullaby is created!

Everything runs entirely on Cloudflare, making it fast, scalable, and serverless.

How we built it

Frontend: Built on Cloudflare Pages with React, styled in a soft bedtime palette for accessibility and calm UX.

Backend: Implemented with Cloudflare Workers, managing sessions, caching, and API orchestration.

Gemini API (Story mode): Three phase generation process

  1. Creates detailed story prompt from user inputs.
  2. Generates story structure and content from prompt.
  3. Prompts ElevenLabs for text-to-speech customization.

Gemini API (Song mode): Two phase generation process

  1. Creates and produces a detailed music composition, including lyrics, instrumentals, and mood.
  2. Produces a structured composition plan with ElevenLabs Music API incorporating a tempo guide and section definition.

ElevenLabs Text-to-Speech API: Converts text into expressive, emotion-aware narration; optional voice cloning personalizes the experience.

ElevenLabs Text-to-Music API: Generates studio grade music through natural language prompts.

Cloudflare Workers KV & R2: Stores story data and audio files, keeping everything lightweight and allowing for playback, supporting high read volumes with low latency.

Workers AI: Ensures age-appropriate content and grade-level readability.

We used Wrangler for deployment and a clean monorepo to connect Pages and Workers seamlessly.

Challenges we ran into

Designing prompts that create emotionally resonant yet child-safe stories that include moral learning.

Managing state and caching across Cloudflare KV and R2 efficiently. Integrating multiple AI systems (Gemini, ElevenLabs, Workers AI) under tight hackathon time constraints.

Creating an accurate clone of someone's voice was challenging. This is because we had limited credits and could only use small voice recordings.

Operating a monorepo effectively, ensuring we don't overwrite any code. Multiple times when working on frontend or backend features two of us would change the same file which led to merge conflicts before pushing to main.

Accomplishments that we're proud of

Built a fully functional, end-to-end AI storytelling system entirely on Cloudflare.

Created a personalized moral-learning experience that actually feels warm and human.

Integrated voice cloning to let parents become the storyteller — a powerful emotional hook.

What we learned

How to chain multiple AI services effectively — Gemini for structure, ElevenLabs for emotion, Cloudflare for performance.

The importance of prompt engineering in ensuring structured, predictable model behavior. How expressive audio can transform storytelling into a deeply emotional experience.

Building entirely on Cloudflare’s ecosystem taught us how to create scalable, serverless systems quickly and efficiently.

Branching is important on git, it helps prevent overwriting code and allows for many people to test new features without altering the main branch.

What's next for TaleWeaver

Interactive multi-choice stories: Let children guide longer adventures with multiple branching paths. Essentially allowing kids to create their own chapter books from scratch!

Emotion detection: Use voice tone and word choice to adapt moral difficulty or depth. After text generation, Gemini can attach a log of voice customizations in order to reflect emotion during narration.

Classroom mode: Teachers can create stories to teach empathy, teamwork, or honesty.

Dialogue Implementation: Incorporating dialogue to create more engaging stories. Prompting ElevenLabs to use many different voices when a character has dialogue in the story.

Therapeutic applications: Tailor stories to help kids process emotions like fear or loss. When implementing this feature it's imperative that our prompting is well written, watering down negative topics so that a kid can understand and grow.

Multilingual support: Bring TaleWeaver to families worldwide. Using Eleven Multilingual V2 we can produce stories and songs in different languages so that any kid is allowed to create their own story.

Built With

Share this project:

Updates