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.Documentation Index
Fetch the complete documentation index at: https://docs.upliftai.org/llms.txt
Use this file to discover all available pages before exploring further.
Complete Demo Code
Get all files from GitHub
Quick Download
Prerequisites
- Python 3.9 or higher
- An Uplift AI API key (Get one here)
- An OpenAI API key (Get one here)
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 namedagent.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)
Option B: Web Interface
That’s It!
Your Pakistan History voice assistant is now running! Try asking questions like:- “قائد اعظم کے بارے میں بتائیں”
- “پاکستان کب بنا تھا؟”
- “موہنجو داڑو کیا ہے؟“
Additional Resources
- Complete Demo Repository - Full working example with all files
- LiveKit Documentation - Learn more about LiveKit
- Uplift AI API Reference - Explore more TTS options
- OpenAI API Documentation - OpenAI models and features
- LiveKit Python SDK - Python SDK reference
Troubleshooting
ImportError: No module named 'livekit'
ImportError: No module named 'livekit'
Make sure you’ve installed all dependencies with the pip command in Step 1.
API Key Errors
API Key Errors
Double-check your
.env file has the correct API keys without quotes.Connection Failed
Connection Failed
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
