{"slug": "udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights", "title": "Udhaar-Khata: Voice AI Digital Ledger for My Father Using 100% Local Open-Weights (Gemma 2 + Whisper)", "summary": "A developer built Udhaar Khata, a voice-powered digital credit ledger for their father's neighbourhood shop in India, running entirely on local open-weights models. The app uses OpenAI's Whisper for Hindi and Hinglish speech transcription and Google's Gemma 2 2B via Ollama to extract customer names, rupee amounts, credit/debit direction and item notes into structured JSON, keeping all customer data offline with no cloud APIs or subscription fees.", "body_md": "*This is a submission for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)*\n\n## \n  \n  \n  What I Built\n\nI built **Udhaar Khata (उधार खाता)** — a voice-powered, 100% local open-weights digital ledger and credit book built specifically for **my father**.\n\nMy father manages a neighbourhood shop in India. Like millions of small business owners and community elders, managing daily customer credit (*udhaar*) is a constant challenge. Customers regularly take essential items (rations, groceries, milk) on credit and settle their balances later. \n\nFor decades, my father has tracked everything in dog-eared paper notebooks (*bahi khata*). Whenever I suggested commercial bookkeeping apps, he found them frustrating:\n\n1. Smartphone touch keyboards are awkward and slow when your hands are busy handling merchandise and customers are waiting in line.\n2. The menus are cluttered with English-first business jargon and ads.\n3. Most importantly, he hated the idea of uploading his customers' personal phone numbers and debt history to unknown third-party cloud servers.\n\n**Udhaar Khata solves this completely through voice-first open-weights AI.**\n\nMy father simply taps the microphone and speaks naturally in colloquial Hindi or Hinglish:\n\n- \n*\"Ramesh ne 200 udhaar liya\"* (Ramesh took ₹200 on credit)\n- \n*\"Sunita ne 500 wapas kiye\"* (Sunita repaid ₹500)\n- \n*\"Sharma ji ko 1200 ka ration udhaar diya\"* (Sharma ji took ₹1200 worth of ration on credit)\n- \n*\"Mukesh ne 450 jama karwaye\"* (Mukesh deposited ₹450)\n\nThe application transcribes the speech locally using **OpenAI Whisper**, extracts the customer name, rupee amount, credit/debit direction, and item notes using **Google Gemma 2 (2B)**, displays a clean confirmation card with audio playback, updates the customer's balance sheet, and even crafts polite, culturally respectful Hindi payment reminders with 1-click WhatsApp messaging!\n\n## \n  \n  \n  Demo\n\n### \n  \n  \n  📸 Dashboard Overview\n\n### \n  \n  \n  🎥 End-to-End Walkthrough (Voice Input, Confirmation, Reminders & Settlements)\n\n- \n**Voice & Speech Input Hub** : Pulsating mic button with audio waveform animation, bilingual speech recognition, and instant sample chips.\n- \n**AI Extraction & Confirmation Card** : Displays detected customer name, amount, credit/debit toggle, and audio confirmation feedback before committing to the ledger.\n- \n**Customer Directory & Balance Sheet** : Instant breakdown of*Kispar kitna baaki hai* (Who owes what), color-coded red for*Lena hai* (To collect) and green for*Hisaab chukta* (Settled).\n- \n**Culturally Respectful Payment Reminders (तगादा)** : Generates reminders in 3 distinct tones (विनम्र / Polite, मित्रतापूर्ण / Friendly, व्यावसायिक / Formal) plus custom AI drafting, with a direct 1-click**WhatsApp Share** button.\n- \n**1-Click Settlement (\"Hisaab Chukta\")** : One click settles debts with confetti celebration.\n- \n**100% Offline & Private** : Zero external cloud APIs, zero subscription fees.\n\n## \n  \n  \n  Code\n\nThe entire source code is structured with a Python FastAPI backend and a modern React Vite frontend:\n\n## \n  \n  \n  How I Built It\n\nUdhaar Khata is built from the ground up around **open-weights AI models running locally on consumer hardware**:\n\n### \n  \n  \n  1. Information Extraction & Semantic Parsing (Google Gemma 2 2B)\n\n- We run Google's **Gemma 2 2B** (`gemma2:2b` ) locally via Ollama with Metal GPU acceleration on Apple Silicon.\n- Gemma 2 is prompted to understand colloquial Indian financial terms (*udhaar* ,*jama* ,*chukta* ,*baaki* ,*rokda* ,*saman* ) and outputs strict structured JSON containing`customer_name` ,`amount` ,`type` , and`note` .\n- To guarantee 100% uptime and sub-millisecond responsiveness even under cold-start conditions, we paired Gemma 2 with a deterministic Indic-NLP bilingual rule engine.\n\n### \n  \n  \n  2. Speech-to-Text (Open-Weight OpenAI Whisper)\n\n- Audio transcription runs through open-weight **faster-whisper** (`ctranslate2` + int8 quantization) and the browser Web Speech API, allowing my father to speak naturally in Hindi (`hi-IN` ) and Hinglish without typing a single character.\n\n### \n  \n  \n  3. Polite Hindi Reminder Generator\n\n- In Indian business culture, asking customers to repay credit can feel awkward or socially sensitive. \n- Using Gemma 2 2B, the app drafts culturally nuanced payment reminders in three predefined tones (Polite, Friendly, Formal) as well as custom prompts (e.g. *\"Tell them distributor payment is due tomorrow\"* ), and encodes them into instant WhatsApp click-to-chat links (`https://wa.me/...` ).\n\n### \n  \n  \n  4. Local Database & Privacy Architecture\n\n- All customer accounts, contact numbers, and transaction ledgers are stored in a local **SQLite database** on my father's laptop. Not a single byte of financial data ever touches an external cloud server.\n\n## \n  \n  \n  Why Does Open Innovation Matter?\n\nThis project is a living example of where **an open-weights approach worked infinitely better than closed commercial APIs**:\n\n1. \n**Financial Sovereignty & Absolute Privacy** : Small shopkeeper credit books contain confidential debt records, personal trust networks, and customer phone numbers. Sending this sensitive financial ledger to third-party proprietary APIs (like OpenAI or Claude) is an unnecessary privacy and trust risk. With Gemma 2 and Whisper running locally, my father's records stay 100% on his machine.\n2. \n**Works in Marketplaces with No Internet** : Indian local markets and small towns frequently experience broadband cuts and spotty mobile reception. Closed APIs fail the moment the Wi-Fi drops. By running open-weights inference locally, Udhaar Khata works seamlessly 24/7 without internet.\n3. \n**Zero Operating Cost (Forever ₹0)** : A small neighbourhood shopkeeper operating on tight margins cannot pay metered token bills or $20/month SaaS subscription fees. Open weights allow this application to run indefinitely on consumer hardware for free.\n4. \n**Colloquial Linguistic Freedom** : Open models gave us the flexibility to fine-tune system prompts for colloquial Hinglish dialects without hitting arbitrary API censorship or rigid guardrails around financial language.\n\n## \n  \n  \n  My Agent Session\n\nI built this project with pair programming and browser automation. You can explore the full session transcript here:\n\n## \n  \n  \n  Prize Categories\n\n- \n**Best Use of Gemma** (Featured Category)\n- **Overall Hacktoberfest Winner**", "url": "https://wpnews.pro/news/udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights", "canonical_source": "https://dev.to/ish1416/udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights-gemma-2--2da9", "published_at": "2026-10-04 09:36:31+00:00", "updated_at": "2026-10-04 09:42:25.950250+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "natural-language-processing", "ai-products"], "entities": ["Udhaar Khata", "Google", "Gemma 2", "OpenAI", "Whisper", "Ollama", "FastAPI", "React"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights", "markdown": "https://wpnews.pro/news/udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights.md", "text": "https://wpnews.pro/news/udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights.txt", "jsonld": "https://wpnews.pro/news/udhaar-khata-voice-ai-digital-ledger-for-my-father-using-100-local-open-weights.jsonld"}}