Skip to content

ParthMozarkar/AI-Voice-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 AI Voice Agent (Telecaller)

Python FastAPI Twilio Deepgram Groq

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.

🚀 Features

  • ⚡ 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.

🛠️ Tech Stack

  • 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)

⚡ Quick Start

1. Clone the Repo

git clone https://github.com/ParthMozarkar/AI-Voice-Agent.git
cd AI-Voice-Agent

2. Install Dependencies

pip install -r requirements.txt

(Note: Create a virtual environment first recommended)

3. Set Up Environment Variables

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_https

4. Run the Server

python -m uvicorn main:app --reload

5. Expose & Connect

  1. Run ngrok http 8000 to get your public URL.
  2. Update NGROK_URL in your .env.
  3. Trigger a call by visiting: http://localhost:8000/callme

📂 Project Structure

├── main.py          # The heart of the agent (FastAPI + WebSocket logic)
├── .env             # API Keys (Not committed)
├── requirements.txt # Python dependencies
└── README.md        # This sexy file

🤝 Contributing

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors