Build a Fortune Teller App with AI Voice, Phone, and Tool Calling

Fortune Teller App

Ever wanted to peek into your future? Well, now you can build an app for that! I recently created a fortune teller app using Gabber that lets users get their fortune told through both web and SMS interfaces. The best part? It took less than an hour to build.

Whats Inside

The fortune teller app demonstrates several key features:

  • 🔮 AI-powered fortune telling through voice or text
  • 📱 SMS integration for on-the-go fortune telling
  • 🗣️ Custom AI persona with a mystical voice
  • 🔄 External function calling for dynamic responses

How It Works

  1. Users can interact with the fortune teller through:
  • Web interface with voice/text chat
  • Phone by calling a dedicated phone number
  1. The user can touch the crystal ball to get a fortune.
  2. The AI persona, powered by Gabber, responds with mystical insights and predictions
  3. Behind the scenes, it uses:
  • Gabber's Persona Engine for the fortune teller character
  • Tool calling for kicking off the fortune telling session
  • Voice synthesis for that perfect mystical tone
  • Gabber's phone integration for the phone number calling

How to Actually Build the Fortune Teller App in Under an Hour

In this tutorial, I'll walk you through how I built a fortune teller app using Gabber in under an hour. We'll cover creating an AI persona, setting up tool calling, and integrating SMS functionality.

Step 1: Creating the Fortune Teller Persona

First, we need to create our mystical AI persona in Gabber:

Persona
  1. Log into the Gabber Dashboard
  2. Navigate to Personas
  3. Create a new persona with these key elements:
    • Personality: Mystical fortune teller
    • Voice: Selected from Gabber's voice library
    • Scenario: Fortune telling session

Step 2: Setting Up Tool Calling

Tool calling allows our fortune teller to generate dynamic responses. Here's how to set it up:

  1. In Gabber, create a new tool.
Tool Calling
  1. Set up a Pipedream webhook to handle the fortune generation:
Pipedream

Step 3: Phone Integration

To enable phone functionality:

  1. Get a phone number through Twilio
  2. Associate it with your persona:
Phone Integration

Step 4: Web Interface

Create a simple web interface using Gabber's React SDK:

<ApiProvider usageToken={usageToken}>
            <RealtimeSessionEngineProvider
              connectionOpts={{
                token: usageToken,
                config: {
                  generative: {
                    llm: "21892bb9-9809-4b6f-8c3e-e40093069f04",
                    persona: "87134b2f-24f2-44ef-a30e-8502ec5a9ce7",
                    scenario: "8c7401bb-b1ce-469e-8b64-25e0646b66a9",
                    voice: "9b80821f-c96f-445b-a211-638938edd775",
                    tool_definitions: [
                      "9e67d646-7dbc-4f3b-a850-6966113d2675",
                    ]
                  },
                  general: {},
                  input: { interruptable: true, parallel_listening: true },
                  output: {
                    stream_transcript: true,
                    speech_synthesis_enabled: true
                  }
                },
              }}
            >
              <MinimalChat ref={chatRef} />
            </RealtimeSessionEngineProvider>
          </ApiProvider>

Testing It Out

You can test your fortune teller:

  1. In the Gabber dashboard
  2. Through Phone
  3. Via the web app
Web Interface

Next Steps

Try It Yourself

Want to get your fortune told or build an app like this? You can:

  1. Try the phone demo: 805-439-8596
  2. Build your own: Sign up for Gabber and check out the code here
  3. View our docs here

Remember, this is just one example of what you can build with Gabber. The same principles can be applied to create any kind of AI-powered application with voice, text, and external integrations.