An AI-powered voice sales agent that makes outbound calls, engages users in natural conversation, and books follow-up demo calls. Built with Twilio for telephony, Deepgram for AI voice interaction (using OpenAI GPT-4o), and a FastAPI/React stack.
- Outbound Calls: Users can request calls via a React frontend; Twilio initiates the call.
- Real-Time Voice Interaction: The AI agent "Emma" uses Deepgram to listen, think (via GPT-4o), and speak naturally.
- Admin Dashboard: Configure the company name and knowledge summary for the AI agent.
- Audio Streaming: Bidirectional WebSocket streaming between Twilio and Deepgram with audio resampling.
- Backend: FastAPI (Python), WebSockets,
numpy,soundfile,aiohttp - Frontend: React, React Router
- Telephony: Twilio
- AI Voice: Deepgram Agent (OpenAI GPT-4o, Aura-Asteria TTS)
- Dependencies: See
backend/requirements.txtandfrontend/package.json
- Python 3.9+
- Node.js 18+
- Twilio account (API credentials)
- Deepgram account (API key)
- Git installed
- Navigate to
backend/:cd backend - Create a virtual environment and activate it:
python -m venv venv venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set environment variables in a
.envfile:TWILIO_ACCOUNT_SID=your_sid TWILIO_AUTH_TOKEN=your_token TWILIO_PHONE_NUMBER=your_twilio_number PUBLIC_BASE_URL=https://your-public-url DEEPGRAM_API_KEY=your_deepgram_key - Run the FastAPI server:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
- Navigate to
frontend/:cd frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
- Access at
http://localhost:5173.
- Access at
- Start the backend server.
- Run
npx localtunnel --port 3000 --subdomain mycustomnameon terminal to expose backend API to internet for Twilio WebSocket connectivity. - Start the frontend.
- Log in as:
- Admin:
admin/passat/company-login - User:
user/passat/
- Admin:
- Configure company info and knowledge via the admin dashboard.
- Request a call as a user with a valid phone number.
- No database; data is stored in memory.
- Hardcoded frontend credentials.
- Conversation history endpoint is not yet implemented.
- Requires a public URL (e.g., localtunnel) for Twilio WebSocket connectivity.
- Add a database (e.g., Mongo) for persistence.
- Implement secure authentication (JWT, OAuth).
- Store and retrieve conversation logs.
- Enhance error handling and logging.