AI Voice Agent - Quick Start Guide
π Quick Start
Option 1: One-Click Install & Run (Windows)
Option 2: Manual Installation
π Access the Application
- Backend API: http://localhost:8000
- Frontend UI: http://localhost:8000 (React app served by FastAPI)
- API Documentation: http://localhost:8000/docs
π Environment Variables
- GROQ_API_KEY : For Groq AI STT/TTS services
- TURSO_DATABASE_URL : Cloud database URL
- TURSO_AUTH_TOKEN : Database authentication token
π± How to Use
- Start a session: Open http://localhost:8000 in your browser
- Voice interaction: Click the microphone button to speak
- Text interaction: Type messages in the chat interface
- Lead qualification: The AI will ask for:
- Company name
- Domain/Industry
- Problem statement
- Budget information
- Media display: Images/videos will appear based on conversation context
- Session management: All interactions are saved to the cloud database
π§ API Endpoints
- POST /api/chat/text - Text-based conversation
- POST /api/chat/audio - Audio-based conversation (STT/TTS)
- GET /api/sessions - List all sessions
- GET /api/session/session_id/summary - Get session summary
- POST /api/session/session_id/start - Start a new session
- POST /api/session/session_id/close - Close a session
π― Features
β Lead qualification workflow with structured data collection
β Dynamic media display based on conversation context
β Session persistence with Turso cloud database
β Comprehensive logging of all interactions
β React frontend with shadcn UI components
β FastAPI backend with automatic API documentation
β Multi-session support with unique session IDs
π οΈ Technology Stack
- Frontend: React + Vite + shadcn UI
- Backend: FastAPI + Python
- Database: Turso (libSQL) - Cloud database
- AI Services: Groq AI (Whisper STT + PlayAI TTS)
- Audio Processing: Web Audio API + aiofiles
π Database Schema
- sessions - Session information and lead data
- chat_history - All conversation messages
- media_interactions - Logged media display events