<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sudhanshu Singh</title>
    <description>The latest articles on DEV Community by Sudhanshu Singh (@sudhanshu_singh).</description>
    <link>https://dev.to/sudhanshu_singh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4079118%2Fce6e9d52-d4c4-4222-986a-23223f9ddf92.jpeg</url>
      <title>DEV Community: Sudhanshu Singh</title>
      <link>https://dev.to/sudhanshu_singh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sudhanshu_singh"/>
    <language>en</language>
    <item>
      <title>From Zero to Voice Agent: My 10-Day Journey Building an AI Voice Agent</title>
      <dc:creator>Sudhanshu Singh</dc:creator>
      <pubDate>Sat, 15 Aug 2026 14:47:15 +0000</pubDate>
      <link>https://dev.to/sudhanshu_singh/from-zero-to-voice-agent-my-10-day-journey-building-an-ai-voice-agent-2h7a</link>
      <guid>https://dev.to/sudhanshu_singh/from-zero-to-voice-agent-my-10-day-journey-building-an-ai-voice-agent-2h7a</guid>
      <description>&lt;h1&gt;
  
  
  Building AgentX: An AI Voice Assistant for Indian Farmers Powered by Murf Falcon 2
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;10 Days of AI Voice Agents Challenge — Day 10 Submission | #VoiceForBharat&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;For millions of farmers across India, timely access to agricultural information—such as crop disease identification, weather updates, and mandi (market) prices—can make the difference between a successful harvest and a heavy financial loss. However, existing digital tools present significant barriers: complex mobile interfaces, text-heavy portals, and a lack of support for regional Indian languages or casual code-mixed conversations (Hinglish/Hindi).&lt;/p&gt;

&lt;p&gt;To bridge this digital divide, I built &lt;strong&gt;AgentX&lt;/strong&gt;—a voice-first, multilingual AI assistant tailored specifically for Indian agriculture. &lt;strong&gt;AgentX&lt;/strong&gt; allows farmers to simply speak into their phones in &lt;strong&gt;Hindi, Hinglish, or Devanagari script&lt;/strong&gt; and receive real-time, knowledge-backed voice advice.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/singhsudhanshu22168-web/Voice-Agent-Day9" rel="noopener noreferrer"&gt;singhsudhanshu22168-web/Voice-Agent-Day9&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Challenge&lt;/strong&gt;: #VoiceForBharat — 10 Days of AI Voice Agents (Murf AI)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  High-Level System Architecture
&lt;/h2&gt;

&lt;p&gt;AgentX operates as a real-time, bi-directional voice pipeline built on the &lt;strong&gt;LiveKit Agent Framework&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  [ Farmer's Voice Input ]
             │
             ▼
┌──────────────────────────┐
│  LiveKit WebRTC Audio    │  (Low-Latency Real-Time Transport)
└────────────┬─────────────┘
             │
             ▼
┌──────────────────────────┐
│  Speech-to-Text (STT)    │  (Multilingual &amp;amp; Hinglish Recognition)
└────────────┬─────────────┘
             │
             ▼
┌──────────────────────────┐
│   Agent Engine + RAG     │ ◄───► [ Weather &amp;amp; Mandi APIs ]
│  (LLM + Vector Database) │ ◄───► [ Agronomy RAG Knowledge Base ]
└────────────┬─────────────┘
             │
             ▼
┌──────────────────────────┐
│   Murf Falcon 2 TTS      │  (Natural Indian Accent Voice Synthesis)
└────────────┬─────────────┘
             │
             ▼
  [ Expressive Voice Response ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Components:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Transport&lt;/strong&gt;: LiveKit WebRTC for ultra-low latency audio streaming.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;STT&lt;/strong&gt;: Deepgram / Whisper tuned for Hindi, Devanagari, and Hinglish phonetics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM Engine&lt;/strong&gt;: Generative AI backed by &lt;strong&gt;RAG (Retrieval-Augmented Generation)&lt;/strong&gt; to prevent hallucinations and provide accurate agricultural advisories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TTS Engine&lt;/strong&gt;: &lt;strong&gt;Murf Falcon 2&lt;/strong&gt;, delivering natural, warm, and human-like Indian accent speech synthesis.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Key Features of AgentX
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1.  Natural Voice AI (Powered by Murf Falcon 2)
&lt;/h3&gt;

&lt;p&gt;AgentX converses naturally without mechanical or robotic delays. By integrating &lt;strong&gt;Murf Falcon 2&lt;/strong&gt;, the agent produces ultra-realistic Indian accent voice responses that sound trustworthy and easy to understand over mobile speakers.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.  Crop Intelligence &amp;amp; Disease Diagnosis
&lt;/h3&gt;

&lt;p&gt;Farmers can describe symptoms (e.g., &lt;em&gt;"Meri gehun ki fasal ke patte peele ho rahe hain"&lt;/em&gt; / &lt;em&gt;"Wheat leaves turning yellow"&lt;/em&gt;). AgentX cross-references agronomy guides to suggest exact diagnosis and organic or chemical treatment dosages.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.  Weather Intelligence
&lt;/h3&gt;

&lt;p&gt;AgentX checks hyper-local weather forecasts using live APIs before advising on irrigation, pesticide spraying, or harvesting schedules. For example, if rain is predicted in 24 hours, it warns the farmer not to apply pesticides.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.  Market Intelligence (Mandi Prices)
&lt;/h3&gt;

&lt;p&gt;Farmers can query live commodity rates across regional Mandis (e.g., &lt;em&gt;"Aaj Indore mandi me Gehun ka bhav kya hai?"&lt;/em&gt;). AgentX retrieves real-time pricing data to help farmers decide when and where to sell for maximum profit.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.  Multilingual &amp;amp; Code-Mixed Support (Hindi / Hinglish / Devanagari)
&lt;/h3&gt;

&lt;p&gt;AgentX naturally understands code-mixed speech (mixing Hindi and English terms like &lt;em&gt;"pest control"&lt;/em&gt;, &lt;em&gt;"urea"&lt;/em&gt;, &lt;em&gt;"irrigation"&lt;/em&gt;, &lt;em&gt;"weather warning"&lt;/em&gt;) and responds accurately in Hinglish or fluent Hindi.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.  AI + RAG (Knowledge-Backed Answers)
&lt;/h3&gt;

&lt;p&gt;Agricultural guidance requires high precision. AgentX uses RAG over verified government agricultural bulletins and agronomic research papers to ground all responses in facts, ensuring zero dangerous hallucinations.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Hardest Challenges &amp;amp; Solutions
&lt;/h2&gt;

&lt;p&gt;Building a real-time voice agent for rural Indian contexts came with technical hurdles. Here is how I solved them:&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenge 1: Code-Mixed Pronunciation in Text-to-Speech
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Traditional TTS models struggle with Hinglish inputs. When reading mixed text like &lt;em&gt;"Gehun crop me yellow rust hai"&lt;/em&gt;, standard models either butcher the English terms or mispronounce Hindi words written in Devanagari/Roman script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: By leveraging &lt;strong&gt;Murf Falcon 2&lt;/strong&gt;, which is natively optimized for Indian speech patterns and multilingual nuances, combined with custom phonetic text normalization before sending prompts to the TTS engine, AgentX delivers smooth, natural Hinglish output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenge 2: Reducing Latency with Parallel RAG &amp;amp; Tool Calling
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: Querying weather APIs, searching Mandi price databases, and performing vector RAG lookup sequentially caused an audible 3-4 second pause before the agent spoke.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Implemented asynchronous parallel execution in Python (&lt;code&gt;asyncio.gather&lt;/code&gt;) to fetch live API data and vector embeddings concurrently. We also enabled &lt;strong&gt;audio streaming&lt;/strong&gt; so Murf Falcon 2 begins sending audio frames back to the client while the remainder of the response is still generating.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step-by-Step Guide: How to Build &amp;amp; Run AgentX
&lt;/h2&gt;

&lt;p&gt;Want to run AgentX locally or build your own voice agent? Follow these steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.10+ installed&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://livekit.io/" rel="noopener noreferrer"&gt;LiveKit Cloud Account&lt;/a&gt; or local LiveKit server&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://murf.ai/" rel="noopener noreferrer"&gt;Murf AI API Key&lt;/a&gt; (for Falcon 2 TTS)&lt;/li&gt;
&lt;li&gt;OpenAI / Gemini API Key&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Clone the Repository
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/singhsudhanshu22168-web/Voice-Agent-Day9.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Voice-Agent-Day9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Set Up Virtual Environment &amp;amp; Install Dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; venv venv
&lt;span class="c"&gt;# On Windows:&lt;/span&gt;
venv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate
&lt;span class="c"&gt;# On Linux/Mac:&lt;/span&gt;
&lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate

pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Configure Environment Variables
&lt;/h3&gt;

&lt;p&gt;Create a &lt;code&gt;.env&lt;/code&gt; file in the root directory (never commit this file to Git!):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LIVEKIT_URL=wss://your-livekit-project.livekit.cloud
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret

MURF_API_KEY=your_murf_falcon_api_key
OPENAI_API_KEY=your_openai_api_key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Run the Agent Worker
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python agent.py dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Connect and Test
&lt;/h3&gt;

&lt;p&gt;Open the LiveKit Agents Playground or your custom frontend client, connect to the room, and start speaking to &lt;strong&gt;AgentX&lt;/strong&gt; in Hindi or Hinglish:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Farmer&lt;/strong&gt;: &lt;em&gt;"Namaste AgentX, aaj meri fasal ke liye mausam kaisa rahega?"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
 &lt;strong&gt;AgentX&lt;/strong&gt;: &lt;em&gt;"Namaste! Aaj aapke ilake me halki baarish hone ki sambhavna hai, isliye aaj keeTnaashak ka chhidkaav na karein."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Conclusion &amp;amp; Acknowledgments
&lt;/h2&gt;

&lt;p&gt;Over the 10 Days of AI Voice Agents challenge, building &lt;strong&gt;AgentX&lt;/strong&gt; demonstrated the immense power of voice-first AI for Bharat. Voice bridges literacy and digital access gaps, making advanced crop, weather, and market intelligence accessible to every farmer.&lt;/p&gt;

&lt;p&gt;Huge thanks to &lt;strong&gt;Murf AI&lt;/strong&gt; for hosting the &lt;strong&gt;#VoiceForBharat Challenge 2026&lt;/strong&gt; and providing access to the incredible &lt;strong&gt;Murf Falcon 2&lt;/strong&gt; text-to-speech model!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you found this guide helpful, check out the code on &lt;a href="https://github.com/singhsudhanshu22168-web/Voice-Agent-Day9" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and leave a  on the repository!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>voice</category>
      <category>python</category>
      <category>livekit</category>
    </item>
  </channel>
</rss>
