<?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: Md Ibrahim</title>
    <description>The latest articles on DEV Community by Md Ibrahim (@md_ibrahim_).</description>
    <link>https://dev.to/md_ibrahim_</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%2F4079188%2F64331fca-7aa9-4f8c-86a5-72aa4908c09e.jpg</url>
      <title>DEV Community: Md Ibrahim</title>
      <link>https://dev.to/md_ibrahim_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/md_ibrahim_"/>
    <language>en</language>
    <item>
      <title>Building Saira: How I Built a Real-Time Voice AI Learning Assistant for Bharat in 10 Days</title>
      <dc:creator>Md Ibrahim</dc:creator>
      <pubDate>Sat, 15 Aug 2026 16:35:09 +0000</pubDate>
      <link>https://dev.to/md_ibrahim_/building-saira-how-i-built-a-real-time-voice-ai-learning-assistant-for-bharat-in-10-days-43mf</link>
      <guid>https://dev.to/md_ibrahim_/building-saira-how-i-built-a-real-time-voice-ai-learning-assistant-for-bharat-in-10-days-43mf</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"If you talk to a man in a language he understands, that goes to his head. If you talk to him in his language, that goes to his heart."&lt;/em&gt; — Nelson Mandela&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Over 250 million students in India step into classrooms every day. Many possess boundless curiosity, but hesitate to raise their hand. &lt;/p&gt;

&lt;p&gt;Traditional educational software still treats learning like a silent exam: cold text boxes, rigid grammar checks, and intimidating interfaces. &lt;/p&gt;

&lt;p&gt;When &lt;a href="https://murf.ai" rel="noopener noreferrer"&gt;Murf AI&lt;/a&gt; launched the &lt;strong&gt;10 Days of Voice Agents — #VoiceForBharat Edition&lt;/strong&gt;, I set out to build an alternative: &lt;strong&gt;Saira&lt;/strong&gt;, an empathetic, bilingual AI Learning and Literacy Voice Assistant that converses naturally with Indian learners, remembers their journey, and guides them patiently through spoken dialogue.&lt;/p&gt;

&lt;p&gt;Here is the story of how Saira came to life, the architectural decisions behind sub-second voice latency, the engineering hurdles conquered, and how you can run this voice agent yourself.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 The Vision: Why Voice is the True Equalizer for Bharat
&lt;/h2&gt;

&lt;p&gt;In Bharat, learning does not happen in isolated, monolingual silos. It happens in vibrant code-mixed sentences — a seamless blend of English, Hindi, and regional dialects, seasoned with unique local cadences.&lt;/p&gt;

&lt;p&gt;Text chatbots fail in this demographic because typing creates friction. &lt;strong&gt;Voice eliminates that friction entirely.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;With Saira, a 10-year-old student doesn't need to struggle with a keyboard to ask what &lt;em&gt;"photosynthesis"&lt;/em&gt; means, or feel embarrassed about mispronouncing a word. Saira listens, encourages, hints, and teaches — just like a dedicated personal mentor sitting across the table.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏛️ The Architecture: Orchestrating Ultra-Low Latency
&lt;/h2&gt;

&lt;p&gt;Conversational voice AI lives or dies by one metric: &lt;strong&gt;Latency&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In natural human speech, conversational turns take between &lt;strong&gt;200ms and 500ms&lt;/strong&gt;. If an AI pauses for two or three seconds to "think," the illusion of presence shatters instantly.&lt;/p&gt;

&lt;p&gt;To achieve fluid, lifelike conversations, Saira runs on a finely orchestrated pipeline:&lt;/p&gt;






&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────┐       Audio Stream       ┌──────────────────────┐
│ 🎙️ Learner Speaks│ ───────────────────────&amp;gt; │ 👂 Deepgram Nova-2   │
└─────────────────┘                          │    Speech-to-Text    │
                                             └──────────┬───────────┘
                                                        │ Transcribed Text
                                                        ▼
┌─────────────────┐      Sub-60ms Audio      ┌──────────────────────┐
│ 🔊 Learner Hears │ &amp;lt;─────────────────────── │ ⚡ Murf Falcon TTS   │
│    Saira Voice  │                          │    (Pooja Voice)     │
└────────┬────────┘                          └──────────▲───────────┘
         │                                              │ Streamed Tokens
         │ LiveKit WebRTC Transport                     │
         └──────────────────────────────────────────────┴───────────┐
                                                                    │
                                            ┌───────────────────────┴──────┐
                                            │ 🧠 Google Gemini 2.5 LLM     │
                                            │    Educational Guardrails    │
                                            └───────────────┬──────────────┘
                                                            │
                     ┌──────────────────────────────────────┼──────────────────────────────────────┐
                     ▼                                      ▼                                      ▼
             ┌──────────────┐                       ┌──────────────┐                       ┌──────────────┐
             │ 💾 Persistent│                       │ 📚 Live Quiz │                       │ 🔄 ARIA Math │
             │   Memory DB  │                       │   &amp;amp; Tools    │                       │   Handoff    │
             └──────────────┘                       └──────────────┘                       └──────────────┘

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Core Stack:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;LiveKit WebRTC&lt;/strong&gt;: Resilient, bidirectional audio channels with native browser compatibility and server-side room management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deepgram Nova-2&lt;/strong&gt;: High-accuracy speech recognition optimized for Indian accents and acoustic environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Murf Falcon&lt;/strong&gt;: The crown jewel of our voice pipeline — delivering &lt;strong&gt;sub-60ms model latency&lt;/strong&gt; and &lt;strong&gt;130ms time-to-first-audio&lt;/strong&gt; with warm, natural Indian intonation (&lt;em&gt;Pooja&lt;/em&gt; voice).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemini &amp;amp; Custom Guardrails&lt;/strong&gt;: Structured reasoning tailored to prioritize pedagogical understanding over simple answer-giving.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;⚡ What Makes Saira Special: 5 Architectural Highlights&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Socratic Pedagogy Over Direct Answers&lt;/strong&gt;&lt;br&gt;
Most chatbots rush to give the answer away. Saira is explicitly instructed &lt;strong&gt;never&lt;/strong&gt; to solve a problem for the student immediately. Instead, she breaks down concepts into intuitive bites, offers gentle hints, and celebrates when the student discovers the answer themselves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Multi-Agent Specialist Handoffs (SAIRA ➔ ARIA)&lt;/strong&gt;&lt;br&gt;
A single agent shouldn't pretend to be an expert in everything. &lt;strong&gt;SAIRA&lt;/strong&gt; specializes in literacy, language, and concept revision. &lt;/p&gt;

&lt;p&gt;When a student asks to practice mental math or algebra, Saira seamlessly triggers a handoff tool that passes conversational control to &lt;strong&gt;ARIA&lt;/strong&gt;, our dedicated Mathematics Practice specialist, preserving the learner's session history without missing a beat:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@function_tool&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;transfer_to_aria&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;RunContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Transfer the learner seamlessly to ARIA for mathematics instruction.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;aria_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AriaAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;chat_ctx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat_ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exclude_instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;aria_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Transferring you to our math specialist, ARIA.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzu9zcdu31nkdecd2d20e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzu9zcdu31nkdecd2d20e.png" alt=" " width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4h3nwubobdsrluvcqphw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4h3nwubobdsrluvcqphw.png" alt=" " width="799" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Persistent Learner Memory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Returning students shouldn't have to introduce themselves every time. Backed by SQLite, Saira recalls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;   Past topics covered&lt;/li&gt;
&lt;li&gt;   Recurring conceptual hurdles&lt;/li&gt;
&lt;li&gt;   Preferred difficulty level and language comfort&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Live Domain Tools with Fail-Safe Fallbacks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Saira connects to a live dictionary API for phonetic spellings and word origins, as well as a structured exercise engine that scores spoken answers out loud. If a live API ever times out, Saira catches the error gracefully and provides verbal guidance rather than failing silently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Empathetic Escalation &amp;amp; Safety Guardrails&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a learner expresses deep distress, frustration, or asks sensitive questions beyond an AI's remit, Saira gently suggests involving a human mentor and logs a structured escalation ticket with the session summary for human educators.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🛠️ The Hard Battles: Engineering Lessons from the Trenches&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Building a real-time voice agent is vastly different from building a text bot. Here are the three hardest hurdles I faced and how I solved them:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The "Awkward Silence" vs. "Rude Interruption" Dilemma&lt;/strong&gt;&lt;br&gt;
Early prototypes either cut off the student mid-thought or hesitated too long after they stopped speaking.&lt;/p&gt;

&lt;p&gt;The Fix: We combined Silero Voice Activity Detection (VAD) with LiveKit’s multilingual turn detector, configuring SentenceTokenizer(min_sentence_len=2) on Murf Falcon. This ensures natural breathing room without sluggishness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The Context Amnesia Problem During Handoffs&lt;/strong&gt;&lt;br&gt;
When transferring from Saira to ARIA, the new agent initially had no recollection of what was just spoken.&lt;/p&gt;

&lt;p&gt;The Fix: We created an active context cloning pattern that preserves conversation history while swapping the system instructions and voice profiles in real time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Token-Stream Audio Jitter&lt;/strong&gt;&lt;br&gt;
Streaming TTS token-by-token can cause audio stuttering if network jitter occurs.&lt;/p&gt;

&lt;p&gt;The Fix: Enabling Murf Falcon's text_pacing=True smoothed out the audio buffering, delivering silky-smooth voice cadence.&lt;/p&gt;
&lt;h2&gt;
  
  
  🚀 How to Build and Run Saira in 10 Minutes
&lt;/h2&gt;

&lt;p&gt;Want to experience Saira or build your own voice agent on this foundation? Follow these steps:&lt;/p&gt;

&lt;p&gt;Prerequisites&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.10+ &amp;amp; uv&lt;/li&gt;
&lt;li&gt;Node.js 18+ &amp;amp; pnpm&lt;/li&gt;
&lt;li&gt;Free API keys from LiveKit, Murf AI, Deepgram, and Google AI Studio.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1. Clone &amp;amp; Set Up Environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone https://github.com/&amp;lt;your-username&amp;gt;/murf-livekit-starter.git&lt;br&gt;
cd murf-livekit-starter&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;2. Create .env.local inside backend/ and frontend/:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;LIVEKIT_URL=wss://your-project.livekit.cloud&lt;br&gt;
LIVEKIT_API_KEY=your_livekit_key&lt;br&gt;
LIVEKIT_API_SECRET=your_livekit_secret&lt;br&gt;
MURF_API_KEY=your_murf_falcon_key&lt;br&gt;
DEEPGRAM_API_KEY=your_deepgram_key&lt;br&gt;
GOOGLE_API_KEY=your_gemini_key&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Launch the Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminal 1: Backend Agent Engine&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;backend
uv &lt;span class="nb"&gt;sync
&lt;/span&gt;uv run python src/agent.py dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Terminal 2: Interactive Frontend&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;frontend
pnpm &lt;span class="nb"&gt;install
&lt;/span&gt;pnpm dev&lt;span class="sb"&gt;`&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Visit &lt;code&gt;http://localhost:3000&lt;/code&gt;, grant microphone permissions, and say hello to Saira!&lt;/p&gt;

&lt;h2&gt;
  
  
  🔮 What Lies Ahead
&lt;/h2&gt;

&lt;p&gt;Saira is only the beginning. The roadmap for Voice AI in education includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regional Dialect Expansion: Native fluency in Tamil, Telugu, Marathi, and Bengali.&lt;/li&gt;
&lt;li&gt;Dial-in Telephony (SIP): Enabling learners in rural communities to call Saira from basic 2G feature phones without requiring internet access.&lt;/li&gt;
&lt;li&gt;Pronunciation Coaching: Real-time acoustic phoneme scoring to help students gain spoken English confidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💬 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Building Saira across these 10 days proved that when you combine ultra-low-latency voice synthesis with thoughtful pedagogy, technology ceases to feel like a machine — it becomes a companion in learning.&lt;/p&gt;

&lt;p&gt;A heartfelt thank you to &lt;strong&gt;Murf AI&lt;/strong&gt; for organizing the #VoiceForBharat challenge and pushing the boundaries of real-time voice intelligence.&lt;/p&gt;

&lt;p&gt;If you found this helpful, drop a reaction, star the repository, and let me know your thoughts in the comments below!&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Project Links &amp;amp; Connect
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/T-cupps/M-Verse" rel="noopener noreferrer"&gt;Check out the Saira Codebase on GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💼 &lt;strong&gt;Connect on LinkedIn:&lt;/strong&gt; &lt;a href="//www.linkedin.com/in/md-ibrahim-4226bb341"&gt;Let's connect on LinkedIn&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎙️ &lt;strong&gt;Powered by:&lt;/strong&gt; &lt;a href="https://murf.ai/api" rel="noopener noreferrer"&gt;Murf AI Falcon TTS&lt;/a&gt; &amp;amp; &lt;a href="https://livekit.io" rel="noopener noreferrer"&gt;LiveKit WebRTC&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ for the **10 Days of Voice Agents — #VoiceForBharat Edition&lt;/em&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>python</category>
    </item>
  </channel>
</rss>
