Skip to main content
Get your voice agent up and running in just a few simple steps. This guide will help you build a voice assistant that teaches Pakistan history in Urdu.

Complete Demo Code

Get all files from GitHub

Quick Download

Prerequisites

Step 1: Install Everything

Run this single command to install all dependencies:

Step 2: Set Up Environment Variables

Create a .env file in your project folder:
Replace your_openai_api_key_here and your_uplift_api_key_here with your actual API keys.

Step 3: Create Your Voice Agent

Create a file named agent.py with this code:

Step 4: Verify Your Setup

Before proceeding, make sure your project directory looks like this:
All three files should be in the same folder!

Step 5: Download Required Files

Run this command to download necessary model files:

Step 6: Run Your Agent!

You have two ways to test your agent:

Option A: Console Mode (Talk Directly)

This lets you talk to your agent directly in the terminal!

Option B: Web Interface

Then open your browser to the URL shown in the terminal.
For the web interface, you’ll need LiveKit credentials. You can get free test credentials at livekit.io.

That’s It!

Your Pakistan History voice assistant is now running! Try asking questions like:
  • “قائد اعظم کے بارے میں بتائیں”
  • “پاکستان کب بنا تھا؟”
  • “موہنجو داڑو کیا ہے؟“

Additional Resources

Troubleshooting

Make sure you’ve installed all dependencies with the pip command in Step 1.
Double-check your .env file has the correct API keys without quotes.
Ensure your internet connection is stable and the API endpoints are accessible.

Get Complete Demo

View the full working example with all files on GitHub