Skip to main content

Storyteller

The storyteller use case demonstrates how to build an AI agent that creates engaging stories with accompanying images. The storyteller agent:

  1. Listens to your story prompts or ideas
  2. Generates creative narratives based on your input
  3. Automatically creates images at key story moments
  4. Narrates the story with synchronized visuals

This guide shows you how to configure both traditional and real-time voice-based storytellers.

Prerequisites

Before starting, ensure you have:

  • TEN Agent playground running. Refer to the Agent quickstart.
  • Agora RTC credentials from Agora Console
  • API keys for your chosen services
    • For traditional pipeline:
    • For real-time V2V:
      • Realtime API key from your V2V provider

Traditional storyteller

This configuration uses separate services for speech recognition, language processing, and speech synthesis (STT + LLM + TTS).

Configuration steps

Set up your storyteller with these steps:

  1. Open the playground at http://localhost:3000
  2. Select the story_teller graph type
  3. Configure modules:
    1. Click Module Picker
    2. Select your preferred STT and TTS modules
    3. Keep the pre-configured OpenAI ChatGPT for LLM
    4. Click Save Changes
  4. Configure properties:
    1. Click the settings button next to the graph selector
    2. Enter your OpenAI API key and other module credentials
    3. Click Save Changes
  5. Start storytelling:
    1. Click Connect to initialize the agent
    2. Wait a few seconds for startup
    3. Begin speaking to create your story

Azure STT integration

For Azure speech recognition:

  1. Select the story_teller_integrated_stt graph type
  2. Configure Azure credentials in the RTC module
  3. Follow the remaining configuration steps above

Pre-configured tools

The story_teller use-case is preconfigured to use openai_image_generate_tool. No additional tool configuration is necessary.

Real-time storyteller (V2V)

Create stories with lower latency using voice-to-voice models.

Configuration steps

Set up your real-time storyteller:

  1. Open the playground at http://localhost:3000
  2. Select the story_teller_realtime graph type
  3. Configure the V2V module:
    1. Click Module Picker
    2. Use the pre-configured OpenAI Realtime or select another provider
    3. Click Save Changes
  4. Configure API credentials:
    1. Click the settings button
    2. Enter your Realtime API key
    3. If using a different V2V provider, copy the prompt from OpenAI Realtime
    4. Click Save Changes
  5. Start creating:
    1. Click Connect to start
    2. Speak naturally to generate stories