Skip to content
MYZATECHSOLUTIONS
CompletedAI & Intelligent Applications

WhatsApp AI Assistant

WhatsApp bot that understands text and voice notes in English or Roman Urdu and replies in the same language, using Claude and Azure AI Speech.

Personal project

Overview

An end-to-end WhatsApp assistant built in three phases: a keyword bot, an LLM-powered assistant, and finally a bilingual assistant that also understands voice notes.

The problem

Answering common questions on WhatsApp by hand takes time, and many users prefer sending voice notes or writing in Roman Urdu rather than English.

The solution

A Flask webhook receives WhatsApp messages through the Meta Cloud API and replies using Claude.

Voice notes are transcribed with Azure AI Speech; the language is detected so the reply comes back in the same language.

Architecture and workflow

  1. User sends a text or voice note on WhatsApp
  2. Meta WhatsApp Cloud API webhook
  3. Flask app
  4. Azure AI Speech transcription (voice notes)
  5. Language detection
  6. Claude generates the reply
  7. Reply sent back through the WhatsApp API

Implementation details

  • Phase 1: Flask webhook with keyword-based answers.
  • Phase 2: keyword logic replaced with Claude for natural answers.
  • Phase 3: voice-note transcription with Azure AI Speech, language detection, and replies in the detected language.
  • Deployed to Azure App Service with a GitHub Actions pipeline.

Challenges and lessons learned

  • Without subscribing the app to the WhatsApp Business account, incoming messages silently stop arriving.
  • Meta's temporary access tokens expire every 24 hours, and very long tokens can be cut off when pasted into a terminal.
  • Urdu speech-to-text needs the ur-IN locale, because ur-PK supports text-to-speech only.
  • Comparing recognition confidence across two locales gave reliable language detection.
  • Bilingual replies needed explicit, rule-based prompting.

Results

  • All three phases working, with no open bugs.

More work

  • Completed

    AI & Intelligent Applications

    Web Research Agent

    Streamlit chat agent that answers questions with current, search-backed information using Claude's built-in web search tool.

    • Python
    • Anthropic Claude API
    • Claude web search tool
    • Streamlit
    • +1 more
  • Completed · Training demo

    AI & Intelligent Applications

    Agentic Chatbot Training Demo

    Flask web chatbot built for a live training session to show how a chatbot becomes agentic by deciding when to search the web.

    • Python
    • Flask
    • Anthropic Claude API
    • Claude web search tool
  • In progress

    AI & Intelligent Applications

    Fraud Detection System

    Credit-card fraud detection comparing supervised, unsupervised, and deep-learning models on a heavily imbalanced dataset, with a multi-agent layer planned.

    • Python
    • scikit-learn
    • TensorFlow
    • Keras

Need something similar?

Tell me about your project and let's explore whether this kind of solution fits.

Start a Conversation