A blazing fast, ultra-low latency AI Telecaller built with Python. This agent can hold natural, human-like conversations over the phone, specifically optimized for Indian contexts. It uses the best-in-class stack for transcribing, thinking, and speaking in milliseconds.
- ⚡ Ultra-Low Latency: Uses Groq (LPU inference) + Deepgram Nova-2 (Fastest STT) for near-instant responses.
- 🗣️ Human-Like Voice: High-quality Text-to-Speech via Deepgram Aura.
- 🇮🇳 Indian Context Optimized: Tuned for Indian English accents and Hindi-English code-switching.
- 📞 Telephony Integration: Seamlessly connects via Twilio Programmable Voice.
- 🛡️ Robust WebSocket Handling: Custom async WebSocket implementation for maximum stability (bypassing SDK bloat).
- 🧠 Smart VAD: Advanced Voice Activity Detection to handle interruptions and natural pauses perfectly.
- Core: Python, FastAPI, WebSockets, aiohttp
- Telephony: Twilio
- Speech-to-Text (STT): Deepgram Nova-2 (via WebSocket)
- Brain (LLM): Llama 3.1 8B Instant (via Groq)
- Text-to-Speech (TTS): Deepgram Aura (via REST API)
git clone https://github.com/ParthMozarkar/AI-Voice-Agent.git
cd AI-Voice-Agentpip install -r requirements.txt(Note: Create a virtual environment first recommended)
Create a .env file in the root directory and add your keys:
ACCOUNT_SID=your_twilio_account_sid
API_KEY_SID=your_twilio_api_key_sid
API_SECRET=your_twilio_api_secret
TWILIO_NUMBER=your_twilio_phone_number
YOUR_NUMBER=your_verified_personal_number
DEEPGRAM_API_KEY=your_deepgram_api_key
GROQ_API_KEY=your_groq_api_key
NGROK_URL=your_ngrok_url_without_httpspython -m uvicorn main:app --reload- Run
ngrok http 8000to get your public URL. - Update
NGROK_URLin your.env. - Trigger a call by visiting:
http://localhost:8000/callme
├── main.py # The heart of the agent (FastAPI + WebSocket logic)
├── .env # API Keys (Not committed)
├── requirements.txt # Python dependencies
└── README.md # This sexy file
Feel free to open issues or submit PRs if you want, but this is mostly a personal playground for voice AI mastery.
Built with ❤️ by Parth Mozarkar