ProjectsSoftware & AI

AI Voice Calling Agent

An outbound caller that listens, understands and replies in a natural voice, holding a first sales conversation over a real phone line.

Result
Hands-free first-touch calls
Context
Internal tool · solo build
Year
2026
Area
Software & AI
Sales & Client Growth
Code
Source on GitHub ↗

01The problem

First-touch qualification calls were repetitive and ate hours of sales time each week.

02What I did

Built a Python agent that places real calls over SIP/VoIP, transcribes the other person in real time with faster-whisper, decides what to say with an LLM (Groq while testing, a local Ollama model in production) and answers in a natural voice with Piper or voice-cloned F5-TTS. A scheduler only dials within calling hours, and Google Sheets holds the contacts and the call log.

03Making a phone line talk to an AI

Phone audio is nothing like a microphone recording: it arrives as 8 kHz G.711 μ-law in 20-millisecond packets. The agent upsamples it to 16 kHz for Whisper, and the 24 kHz speech it generates is brought back down to 8 kHz and sent out at real-time pace, otherwise the other end hears it garbled or rushed.

Transcription runs on faster-whisper on the CPU, the reply comes from Llama 3.1 8B (on Groq while testing, on a local Ollama server in production), and the voice is either Piper or F5-TTS cloned from a 10 to 15 second sample. It waits for 1.8 seconds of silence before answering, keeps replies short, and if the line goes quiet for too long it asks a gentle follow-up question.

04A script, not just a chatbot

A sales call needs structure, so the conversation runs through eight states: greeting, pitch, qualify, handle an objection, collect details, schedule a follow-up, close, done. Moving between them uses simple keyword rules rather than the model, because they are faster and behave the same way every time. The model writes the words; the script decides where the call goes.

Calls are capped at five minutes, it rings for at most 25 seconds and pauses 30 seconds between calls. The scheduler knows the preferred calling hours for 11 UK regions, works in UK time wherever the server is, and waits rather than dialling outside them.

05What happens after the call

Each call ends with a summary of 25 words or fewer and one of ten outcomes, such as "call back", "send an email", "voicemail" or "do not call", written straight back to the Google Sheet. A dry-run mode lets me play the prospect by typing, to test the script without dialling anyone. It was tested on a free Oracle Cloud ARM server and runs as a service that starts on boot.

06The outcome

Routine opening calls can run unattended, with every outcome written back for the team to follow up.

07Tools & skills

  • Python
  • Speech-to-Text (Whisper)
  • Text-to-Speech (F5-TTS)
  • LLM Integration
  • Conversational AI
  • SIP / Telephony
  • Google Sheets API
  • Workflow Automation
  • Google Cloud (GCP)
  • OAuth & Service Accounts
  • Git
Prateek Sahni

Thanks for reading. Want to talk?

Hiring?

I'm open to new roles across engineering, software and AI. I'm happy to walk you through this project in more detail, or send my CV.

Book a 30-minute call Request my CV

Need something like this built?

Tell me what you're working on in a few lines. No brief or deck needed, and you'll get an honest answer on whether I'm the right person for it.

Tell me about itMessage me on LinkedIn