Inspiration

As a parent, I'm in charge of putting my daughter to sleep every night. Bedtime stories became our special ritual - but after lot of nights, I ran out of imagination. I found myself repeating the same stories, and she'd say "Daddy, you already told me that one!" I wanted stories that featured her as the hero, included her favorite things (dragons AND unicorns AND space - why choose?), and taught gentle life lessons. That's when I realized AI could solve this perfectly - generating infinite unique stories personalized to each child.

What it does

DreamTales AI creates personalized bedtime stories where your child is the main character. Parents simply: Enter their child's nick name and age Pick interests (or let AI suggest age-appropriate themes) Choose a moral lesson Select story length (2, 4, or 7 minutes) The app generates a unique story using Google Gemini AI, then narrates it with a soothing voice using ElevenLabs text-to-speech. Stories are saved locally so families can replay favorites. What makes it special Conversational: Voice input lets kids say their name or interests Intelligent: AI suggests age-appropriate story themes based on the child's age Voice-driven: Natural, expressive narration optimized for bedtime (slower pace, gentle pauses) Kid-friendly: Simplified vocabulary that adapts to the child's age group

How I built it:

I built DreamTales AI as a Next.js application with a focus on creating a delightful, parent-friendly experience: Story Generation: Google Gemini 2.0 Flash generates stories with carefully crafted prompts that ensure age-appropriate vocabulary, TTS-friendly formatting (no asterisks or symbols), and natural narrative flow with pauses. Voice Narration: ElevenLabs' multilingual v2 model with custom settings - lower stability for expressive variation, adjusted similarity for natural (not robotic) speech, and style parameters optimized for storytelling. Voice Input: Web Speech API for hands-free interaction - parents can speak their child's name while holding them. AI Suggestions: Gemini-powered interest suggestions help parents discover age-appropriate themes.

Challenges I faced:

TTS reading symbols literally: The AI would output asterisks for emphasis, but ElevenLabs read "asterisk" out loud. I had to craft prompts that avoid formatting symbols and add a text cleaning function. Making AI sound human: Default TTS settings sounded robotic. I spent time tuning stability, similarity boost, and style parameters to achieve warm, expressive storytelling. Age-appropriate content: A story for a 3-year-old needs very different vocabulary than one for a 10-year-old. I implemented tiered vocabulary guidance in the prompts.

What I learned:

Prompt engineering for specific output formats (TTS-friendly text) ElevenLabs voice parameter tuning for different use cases The importance of the small details - like adding "..." for natural pauses in narration How AI can genuinely solve personal problems and create meaningful family moments

Built With

Share this project:

Updates