Skip to content
WhatsApp voice bot conversation: a customer's voice message and the bot's text reply
Featured project

WhatsApp Voice Bot

A WhatsApp bot that transcribes incoming voice notes and replies with context-aware answers from OpenAI GPT models, built in Python on the WhatsApp Business API.

Python
OpenAI API
WhatsApp Business API
Voice message transcriptionContext-aware replies from OpenAI GPT modelsReplies in whatever language the user speaksSaved the client time on routine conversations

1000+

Messages Handled

1 week

Build Time

Any

Language the User Speaks

01 // Overview

From Voice Note to Reply

A voice message arrives on WhatsApp, gets transcribed to text, and goes to an OpenAI GPT model that writes the reply, which the bot sends back in the same chat.

Voice-to-Text Processing

Fetches the audio from WhatsApp and converts it to text before it reaches the model.

AI Response Engine

Writes each reply with an OpenAI GPT model, given the transcribed message and the conversation so far.

WhatsApp Business API

Receives messages through a WhatsApp Business API webhook and sends replies back through the same API.

Engineering

The Decisions Behind It.

What made this hard?

Turn a voice message into text and return a context-aware LLM reply inside WhatsApp's webhook timeout, where every second counts against you.

How was the system structured?

The webhook receiver is separated from the processing pipeline, so WhatsApp gets an immediate acknowledgement while transcription and inference run in the background. The pipeline splits into three discrete stages: media fetch, speech to text, and response generation, each independently testable and replaceable.

What does the codebase look like now?

Every external dependency sits behind its own adapter module, so swapping a provider never touches business logic. The setup guide documents webhook verification, environment variables, and sandbox testing, so any developer can run the bot locally.

All engineering case studies

02 // Features

Key Capabilities

Any Language

Understands and replies in whatever language the user speaks, with no language list to configure.

Conversation Context

Keeps the conversation history so a follow-up question is answered in context.

03 // Role and Result

What I Built and What It Did

I designed and built the whole system myself in one week: the webhook, the processing pipeline and the integrations behind it. It has handled 1000+ messages, the client was very satisfied, and it saved them time on the conversations it now answers.

Replies Inside WhatsApp's Time Limit

The webhook acknowledges WhatsApp immediately and hands the work to a background pipeline, so slow transcription or model calls never cause a timeout.

Three Independent Stages

Media fetch, speech to text and response generation are separate steps, so each can be tested and replaced without touching the others.

Providers Are Swappable

Every external service sits behind its own adapter, so changing the speech or language model provider does not touch the business logic.