{"slug": "building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers", "title": "Building AgriAlert: A Proactive Marathi AI Voice Assistant for Indian Farmers", "summary": "A developer built AgriAlert, a Marathi AI voice assistant for Indian farmers, under the VoiceForBharat Challenge. The system provides real-time weather advisories, Mandi market rates, crop care guidance, and proactive disaster warnings via web and phone calls, using LiveKit for speech-to-text and SIP calling, Murf Falcon for text-to-speech, and an LLM with guardrails and memory. The developer solved challenges such as Devanagari script enforcement and tool chaining latency, and plans to expand to multiple Indian languages.", "body_md": "🌾 1. The Mission: Voice AI for the Backbone of Bharat\n\nIn rural Maharashtra, timely access to agricultural insights can make or break a harvest. Sudden unseasonal rainfall, fast-spreading crop diseases, and fluctuating Mandi prices directly impact a farmer's livelihood. While modern digital tools exist, digital literacy and complex smartphone UIs often stand in the way.\n\nTo bridge this divide, I spent the last 10 days building AgriAlert under the Farm & Field track of the #VoiceForBharat Challenge.\n\nAgriAlert is a Marathi AI voice assistant designed to provide real-time weather advisories, Mandi market rates, crop care guidance, and proactive disaster warnings through voice conversations on the web and direct mobile phone calls.\n\n⚙️ 2. High-Level System Architecture\n\nAgriAlert is built on a real-time conversational voice pipeline:\n\n[ Farmer Voice Input (Web/Phone) ]\n\n│\n\n▼\n\n[ STT: LiveKit Multi-Locale Speech-to-Text ]\n\n│\n\n▼\n\n[ Brain: LLM with Domain Prompt, Guardrails & Memory ]\n\n├── SQLite DB (Caller profile, land size, crops)\n\n├── Tools: Mandi Rates & Weather APIs\n\n├── Telephony: Outbound SIP Calling\n\n└── Specialist Agent: Deep Agronomy Handoff\n\n│\n\n▼\n\n[ TTS: Murf Falcon (Pooja - Marathi) ]\n\n│\n\n▼\n\n[ Real-Time Audio Output (<500ms Latency) ]\n\n🚀 3. Key Features Built Across the 10 Days\n\nUltra-Fast Regional Voice: Powered by Murf Falcon, the Marathi voice (Pooja) speaks naturally in Devanagari Marathi with near-zero latency, understanding code-mixed terms like \"pesticide\", \"urea\", and \"weather\".\n\nStrict Guardrails: Programmed to never guess market prices without verified sources, and strictly refuses to prescribe toxic chemicals without human expert validation.\n\nLong-Term Caller Memory: Uses an SQLite database to remember returning farmers, their district, and their primary crops upon explicit consent.\n\nTool Chaining & Live Data: Automatically pulls the caller's saved district to fetch live weather forecasts and Mandi prices without making the farmer repeat themselves.\n\nProactive Outbound Calls: Uses LiveKit SIP integration to automatically call farmers on their mobile phones when severe weather alerts are issued.\n\nHuman Escalation (KVK Integration): Generates traceable support tickets for complex issues, routing them directly to agricultural extension officers.\n\nCall Analytics Dashboard: Tracks success rates, total calls, and call outcomes in real time while enforcing zero PII retention.\n\nMulti-Agent Specialist Handoff: Seamlessly transfers complex disease diagnosis calls to a dedicated Crop Problem Specialist Agent.\n\n🛠️ 4. Key Challenges & How I Solved Them\n\nDevanagari vs. Romanized Script: Early tests occasionally produced Romanized Marathi (e.g., 'namaste' instead of 'नमस्ते'), which caused TTS pronunciation issues. I resolved this by enforcing strict system prompt constraints requiring all Marathi responses to be strictly in native Devanagari script.\n\nTool Chaining Latency: Calling multiple tools sequentially added noticeable delays. By pre-fetching caller metadata on session connection and passing cached district data into API calls, latency was kept well under conversational thresholds.\n\nProactive Call Opt-outs: Outbound calls can easily feel intrusive. I structured the opening script to immediately state who is calling, why (weather warning), and how to opt out within the first two sentences.\n\n💻 5. Quickstart Guide: Run Your Own Voice Agent\n\nPrerequisites\n\nPython 3.10+\n\nMurf API Key (with Murf Falcon access)\n\nLiveKit Cloud Project & API Keys\n\nClone the Starter Code\n\nBash\n\ngit clone [https://github.com/murf-ai/murf-livekit-starter.git](https://github.com/murf-ai/murf-livekit-starter.git)\n\ncd murf-livekit-starter\n\nConfigure Environment Variables\n\nCreate a .env file in the root directory:\n\nCode snippet\n\nLIVEKIT_URL=your_livekit_url\n\nLIVEKIT_API_KEY=your_api_key\n\nLIVEKIT_API_SECRET=your_api_secret\n\nMURF_API_KEY=your_murf_key\n\n🔮 6. What's Next?\n\nExpanding language models to support multi-lingual pan-India deployment (Hindi, Tamil, Telugu, Gujarati).\n\nDirect integration with official state government agricultural databases and soil testing APIs.", "url": "https://wpnews.pro/news/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers", "canonical_source": "https://dev.to/parth_deshpande_48b3d5ba8/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers-1j17", "published_at": "2026-08-15 08:40:14+00:00", "updated_at": "2026-08-15 09:41:42.377556+00:00", "lang": "en", "topics": ["artificial-intelligence", "natural-language-processing", "ai-products", "ai-agents", "developer-tools"], "entities": ["AgriAlert", "VoiceForBharat Challenge", "LiveKit", "Murf Falcon", "SQLite", "KVK", "Maharashtra"], "alternates": {"html": "https://wpnews.pro/news/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers", "markdown": "https://wpnews.pro/news/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers.md", "text": "https://wpnews.pro/news/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers.txt", "jsonld": "https://wpnews.pro/news/building-agrialert-a-proactive-marathi-ai-voice-assistant-for-indian-farmers.jsonld"}}