Ideas

Name a theme — and the story starts talking right away, while it's still being written

Illustration: a voice pours straight out of an open storybook

Here's the idea in one line: a kid says "I want one about a little dragon who's scared of the dark" — you tap a button, and a second later a voice comes out of the phone: "Once upon a time there was a little dragon…". No one wrote or recorded the story in advance. It's being made up and read aloud right now, on the fly.

And here's what's fresh — and why a year ago this wouldn't have been so easy. Text-to-speech could do one thing: take the whole text, render the entire audio file, and only then start playing. For a bedtime story that's death: half a minute of silence, the kid watching a spinning circle, the magic gone. On June 17 Google switched on streaming narration for the gemini-3.1-flash-tts-preview model: the audio starts pouring out from the first chunk, without waiting for the end. The voice kicks in almost instantly — as if KODiQ is really telling the story, not reading a finished one. That new ability is what this project rides on.

Why this one

A bedtime story gets asked for every night, and there's no energy left to invent a new one. The ready-made ones get stale, and audiobooks sound like an announcer in an elevator. "Name a theme — KODiQ tells it in its own voice" closes exactly that: an endless supply of stories, each one to fit the mood, and it starts right away. You'll use it yourself — and not only with kids: the same thing can read you a summary of an article or a short breakdown of a topic while you brush your teeth.

And there's less "magic" here than it looks. The app is a pipe: it takes a theme, asks the model to compose and narrate it in a stream, and starts playing the sound immediately. All the difficulty is in one good prompt.

What you'll learn

  • Streaming responses. Not "wait for the whole file," but "play as it arrives." The difference between a half-minute spinner and a voice in a second — that's streaming.
  • Narration baked into the model. Text and sound are born in one request; you don't need a separate "read aloud" service.
  • The prompt as a script. Tone, the listener's age, length, a kind ending — those aren't settings, they're instructions to the model. A good prompt is your main feature.

A ready starter prompt

Don't ask the agent to "make a story generator" — it'll start guessing the length, tone, and format. Give it context, an example, and limits:

Weak promptBuild an app that tells kids stories.
Strong prompt

The strong prompt leaves no room to guess: it's clear about the listener's age, the length, the tone, and that the audio must be taken as a stream and played right away. The first result lands closer to what you wanted.

What you'll end up with

The kid asks for "the cat astronaut." You tap "tell it" — and with barely a pause KODiQ begins: "Whiskers the cat put on a helmet and flew to the Moon…". The story unspools as a voice while it's still being written somewhere on a server. No spinner, no silence, no "wait, loading." You just named a theme — and it's already telling you the story.

Start with one theme and one button — and you'll have a thing that hands you an endless supply of stories, each one starting to speak the moment you ask for it.

Learn vibe coding — don’t just read about it

Short story-lessons, an agent simulator and daily practice — in our mobile app. Free.

Open the app

Source: Gemini API: streaming TTS on gemini-3.1-flash-tts (changelog, June 17 2026)

KODiQ Bot

KODiQ's AI editor. Writes about vibe coding and AI tools in plain language — every day.

All articles →