<?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: Farhan</title>
    <description>The latest articles on DEV Community by Farhan (@farhans123456).</description>
    <link>https://dev.to/farhans123456</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%2F2475706%2F8ae20bf0-2071-48a3-84bb-01ad2837dfb1.jpg</url>
      <title>DEV Community: Farhan</title>
      <link>https://dev.to/farhans123456</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farhans123456"/>
    <language>en</language>
    <item>
      <title>ScamShield: An AI Cyber Defense Tool Designed for My Dadi, Powered by Gemma</title>
      <dc:creator>Farhan</dc:creator>
      <pubDate>Sun, 04 Oct 2026 13:43:00 +0000</pubDate>
      <link>https://dev.to/farhans123456/scamshield-an-ai-cyber-defense-tool-designed-for-my-dadi-powered-by-gemma-ja8</link>
      <guid>https://dev.to/farhans123456/scamshield-an-ai-cyber-defense-tool-designed-for-my-dadi-powered-by-gemma-ja8</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Here is a built-in sample text message from ScamShield's test suite:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"URGENT: Your SBI net banking account has been BLOCKED due to incomplete KYC. Click immediately to restore access: &lt;a href="http://sbi-kyc-update.xyz/verify" rel="noopener noreferrer"&gt;http://sbi-kyc-update.xyz/verify&lt;/a&gt; or call 9876543210."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Imagine receiving that at 7:00 AM on a basic smartphone. If you spent decades writing paper checks and visiting branch tellers, a text threatening to freeze your pension triggers immediate dread. The reflex is to tap the link or call the number before morning tea gets cold.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who It's For
&lt;/h3&gt;

&lt;p&gt;I built ScamShield around a clear design persona: &lt;strong&gt;my dadi&lt;/strong&gt; (paternal grandmother).&lt;/p&gt;

&lt;p&gt;To be transparent before the deadline: I did not have a real family member test this interface over the weekend, nor do I have real user quotes to share. I chose not to invent reactions or pretend someone tested this who did not. Instead, I treated my dadi as an anchor persona: someone who relies on WhatsApp and SMS to stay connected with family, has no interest in inspecting URL top-level domains, and needs plain, reassuring guidance in her own language when a message feels suspicious. The immediate next step is a real, sit-down handover with her before installing it on her phone.&lt;/p&gt;

&lt;p&gt;The problem ScamShield addresses is simple: modern cyber fraud in India—from fake electricity disconnections to "digital arrest" intimidation calls—weaponizes artificial urgency. Older adults are targeted because they respect authority and fear penalties. When panic sets in, they do not need a twenty-page security guide; they need one place to drop a screenshot, paste a confusing message, or look up a strange number and receive a clear answer: &lt;strong&gt;Is this real, or is someone trying to trick me?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ScamShield groups its core protections into five headline features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Screenshot Vision Scanner&lt;/strong&gt;: Users upload a screenshot of an SMS, WhatsApp chat, fake UPI QR code, or banking alert. Google's Gemma multimodal model analyzes layout, typography, sender cues, and manipulation tactics to assign a risk score from 0 to 100.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text &amp;amp; Phishing URL Inspection&lt;/strong&gt;: Direct analysis of raw message text and links, checking lookalike domains (homoglyphs), non-standard extensions (&lt;code&gt;.xyz&lt;/code&gt;), IP hosts, and coercive phrasing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversational AI Defense Assistant&lt;/strong&gt;: A dedicated chat helper powered by Gemma where users ask questions in plain language ("A caller claiming to be police says a parcel has drugs in it; what do I do?") and receive calm, step-by-step guidance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Golden Hour Victim Recovery Wizard &amp;amp; FIR Generator&lt;/strong&gt;: When money has already been sent, the first few hours decide whether funds can be frozen before leaving the banking network. The wizard guides reporting to the 1930 National Cyber Crime helpline, provides direct emergency numbers for ten major Indian retail banks, and drafts a formal police FIR complaint letter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Family Alert Center&lt;/strong&gt;: One-click dispatch that posts formatted fraud alerts to a family Discord channel or generates copy-ready summaries for WhatsApp family groups.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Supporting features include a 15-question scam awareness quiz, an active threat intelligence feed backed by Ministry of Home Affairs advisories, an interactive 10-point security hygiene scorecard, a local phone carrier lookup tool, and a crowdsourced fraud reporting database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Application&lt;/strong&gt;: &lt;a href="https://hacktoberfest-scamshield.vercel.app" rel="noopener noreferrer"&gt;https://hacktoberfest-scamshield.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield" rel="noopener noreferrer"&gt;https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Try It in 30 Seconds
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the &lt;a href="https://hacktoberfest-scamshield.vercel.app" rel="noopener noreferrer"&gt;live demo&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Under the header, click &lt;strong&gt;"SBI KYC Block"&lt;/strong&gt; in the &lt;em&gt;Fraudulent / Threats&lt;/em&gt; row.&lt;/li&gt;
&lt;li&gt;The screenshot auto-loads into the scanner. Click &lt;strong&gt;"Analyze with Gemma 4"&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Review the verdict card: notice the red &lt;strong&gt;SCAM&lt;/strong&gt; badge (Risk Score 98/100), the summary, detected red flags, and the action checklist.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Amazon OTP"&lt;/strong&gt; under the &lt;em&gt;Genuine / Legitimate&lt;/em&gt; row and click Analyze. Notice the green &lt;strong&gt;SAFE&lt;/strong&gt; verdict (Risk Score 5/100) explaining why the message is benign.&lt;/li&gt;
&lt;/ol&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%2F1u0tfcj043c7motfmutn.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%2F1u0tfcj043c7motfmutn.png" alt="ScamShield Hero and Screenshot Vision Scanner" width="800" height="511"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The main vision scanner evaluating an urgent fake SBI KYC message, producing a clear risk verdict and immediate safety steps.&lt;/em&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%2Frl4cnoji8u0rhyfq646r.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%2Frl4cnoji8u0rhyfq646r.png" alt="Text and SMS Message Analyzer" width="800" height="511"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Text message analysis highlighting red flags: lack of an official 6-character TRAI sender header, deceptive top-level domain, and intimidation tactics.&lt;/em&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%2F8eonlfmm2t117dddt5n8.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%2F8eonlfmm2t117dddt5n8.png" alt="AI Safety Assistant" width="800" height="528"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Conversational safety assistant deconstructing the anatomy of a 'Digital Arrest' intimidation scheme.&lt;/em&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%2Fmuouwsdi5p3vl82ouqrs.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%2Fmuouwsdi5p3vl82ouqrs.png" alt="Golden Hour Victim Recovery Checklist" width="800" height="511"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Step-by-step crisis response wizard detailing immediate actions, bank contacts, and National Cyber Crime 1930 reporting.&lt;/em&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%2Fvju34uh0ixyljsq0fjzi.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%2Fvju34uh0ixyljsq0fjzi.png" alt="Security Hygiene Audit" width="800" height="511"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Personal security posture audit evaluating UPI PIN habits, SIM swap risks, and remote desktop application hygiene.&lt;/em&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%2Fv2ddtq89go3t44urudcm.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%2Fv2ddtq89go3t44urudcm.png" alt="Family Alert Broadcast Center" width="800" height="511"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Family alert center allowing users to broadcast an urgent warning to a family Discord channel or copy it for WhatsApp.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/YTxFSGAMERz" rel="noopener noreferrer"&gt;
        YTxFSGAMERz
      &lt;/a&gt; / &lt;a href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield" rel="noopener noreferrer"&gt;
        hacktoberfest-ScamShield
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      AI-powered scam detection using Gemma 4. Upload screenshots, get risk verdicts in English/Hindi/Gujarati. Built for Hacktoberfest 2026.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🛡️ ScamShield — Autonomous AI Cyber-Defense &amp;amp; Anti-Fraud Suite&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://hacktoberfest.com/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/4d751bf05ff55eb422a04cfccfe7bb222d81230a4f303715074994626c455b81/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4861636b746f626572666573742d323032362d6f72616e67652e7376673f7374796c653d666c61742d737175617265" alt="Hacktoberfest 2026"&gt;&lt;/a&gt;
&lt;a href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/458425f8985b0b0c8a736cffe75e05a098e3d77906acddbcad2bfc54492a4e02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://www.python.org/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/24e2ae7756478592fe7f5529fb247f917568fda6935291e7ae742e2c2f1e071c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e2d332e31302532422d626c75652e7376673f7374796c653d666c61742d737175617265" alt="Python 3.10+"&gt;&lt;/a&gt;
&lt;a href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield/tests/" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/3b22e909383d77e661b5e74c2e1691875b06a9dbd497402f8a001a4329453792/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d353425323050617373696e672d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265" alt="Tests: 54 Passing"&gt;&lt;/a&gt;
&lt;a href="https://ai.google.dev/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ab3721cd3f39ac114281192a545fa0a34c6db553741c9cb9e29a13bad75a36ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41492d476f6f676c6525323047656d6d61253230342d707572706c652e7376673f7374796c653d666c61742d737175617265" alt="Powered by Gemma 4"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ScamShield&lt;/strong&gt; is an AI-powered cyber-threat defense, OSINT intelligence, and scam neutralization platform designed specifically to safeguard citizens from complex modern fraud vectors — from &lt;strong&gt;Digital Arrest&lt;/strong&gt; psychological traps and &lt;strong&gt;UPI refund scams&lt;/strong&gt; to &lt;strong&gt;malicious APK banking trojans&lt;/strong&gt;, &lt;strong&gt;SIM swap attacks&lt;/strong&gt;, and &lt;strong&gt;AI voice/deepfake clones&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Powered by Google Gemma 4 (via Gemini API &amp;amp; local Ollama failover), ScamShield delivers instant multi-dimensional risk scores, forensic explainability, victim recovery protocols, and community-driven threat intelligence across &lt;strong&gt;25+ Indian regional &amp;amp; global languages&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;🌐 &lt;strong&gt;Live Web Application:&lt;/strong&gt; &lt;a href="https://hacktoberfest-scamshield.vercel.app" rel="nofollow noopener noreferrer"&gt;https://hacktoberfest-scamshield.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📸 Visual Showcase &amp;amp; Feature Tour&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;🔍 Screenshot &amp;amp; Multimodal Scanner&lt;/th&gt;
&lt;th&gt;💬 SMS &amp;amp; WhatsApp Text Analyzer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield/assets/screenshots/01_scanner_screenshot.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FYTxFSGAMERz%2Fhacktoberfest-ScamShield%2FHEAD%2Fassets%2Fscreenshots%2F01_scanner_screenshot.png" alt="Screenshot Scanner"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield/assets/screenshots/02_scanner_text_sms.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FYTxFSGAMERz%2Fhacktoberfest-ScamShield%2FHEAD%2Fassets%2Fscreenshots%2F02_scanner_text_sms.png" alt="SMS Scanner"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Gemma 4 Vision&lt;/strong&gt; extracts OCR text, visual badges, and suspicious UI markers.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Instant semantic NLP analysis&lt;/strong&gt; detects panic language, urgency, and fraud patterns.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;🔗 Phishing &amp;amp; Domain Age Scanner&lt;/th&gt;
&lt;th&gt;📞 Phone OSINT &amp;amp; QR Code Defense&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield/assets/screenshots/03_url_scanner.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FYTxFSGAMERz%2Fhacktoberfest-ScamShield%2FHEAD%2Fassets%2Fscreenshots%2F03_url_scanner.png" alt="URL Scanner"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a rel="noopener noreferrer" href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield/assets/screenshots/04_phone_lookup.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FYTxFSGAMERz%2Fhacktoberfest-ScamShield%2FHEAD%2Fassets%2Fscreenshots%2F04_phone_lookup.png" alt="Phone &amp;amp; QR Scanner"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-layer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/YTxFSGAMERz/hacktoberfest-ScamShield" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The repository is open source under the &lt;strong&gt;MIT License&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  One-Line Setup
&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/YTxFSGAMERz/hacktoberfest-ScamShield.git &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;hacktoberfest-ScamShield &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; python &lt;span class="nt"&gt;-m&lt;/span&gt; flask &lt;span class="nt"&gt;--app&lt;/span&gt; api/index.py run &lt;span class="nt"&gt;--port&lt;/span&gt; 5000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt; and configure &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; or connect a local Ollama instance running Gemma.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;ScamShield pairs a Python Flask backend with a lightweight Single Page Application (vanilla HTML5, CSS3, and JavaScript) designed to load instantly on older mobile hardware.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Browser Client ]  &amp;lt;---&amp;gt;  [ Flask API (api/index.py) ]  &amp;lt;---&amp;gt;  [ AI Router (scamshield/llm.py) ]
  (Vanilla PWA)             (Rate Limiter, Validators)           |
                                                                 +--&amp;gt; Primary: Google Gemma 4 (API)
                                                                 +--&amp;gt; Failover: Ollama (gemma4:e4b Local)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Model Setup and Resilient Fallback Chain
&lt;/h3&gt;

&lt;p&gt;For hosted deployment, ScamShield uses Google's &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt; model via the Google Generative Language API. Because fraud triage cannot tolerate server crashes during a crisis, &lt;code&gt;scamshield/llm.py&lt;/code&gt; implements an automated fallback chain.&lt;/p&gt;

&lt;p&gt;When &lt;code&gt;LLM_PROVIDER&lt;/code&gt; is set to &lt;code&gt;auto&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The app queries the Gemini API for structured JSON containing verdict, risk score, executive summary, detected flags, and guidance.&lt;/li&gt;
&lt;li&gt;If the API errors out (400 Bad Request, quota limit, or timeout), &lt;code&gt;scamshield/llm.py&lt;/code&gt; logs a warning and automatically fails over to a local Ollama instance running &lt;code&gt;gemma4:e4b&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Gemma models often produce separate internal reasoning tokens (&lt;code&gt;p.get("thought", False)&lt;/code&gt;). The extraction engine strips these so the client receives valid JSON.&lt;/li&gt;
&lt;li&gt;If the model wraps JSON in markdown fences, &lt;code&gt;_extract_json()&lt;/code&gt; uses multi-stage parsing (direct parse -&amp;gt; regex -&amp;gt; brace match -&amp;gt; fallback dictionary) to avoid crashes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  One Real Bug from Git History
&lt;/h3&gt;

&lt;p&gt;During multi-language expansion, I hit an import cycle and startup crash (commit &lt;code&gt;ed6883f&lt;/code&gt;: &lt;em&gt;"fix: export SUPPORTED_LANGUAGES at top of i18n.py and add defensive import fallbacks"&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;api/index.py&lt;/code&gt; imported &lt;code&gt;SUPPORTED_LANGUAGES&lt;/code&gt; from &lt;code&gt;scamshield/i18n.py&lt;/code&gt;, but &lt;code&gt;i18n.py&lt;/code&gt; defined it below helper functions with circular references. On Vercel, this threw &lt;code&gt;ImportError: cannot import name 'SUPPORTED_LANGUAGES'&lt;/code&gt;. Hoisting the dictionary to the top of &lt;code&gt;scamshield/i18n.py&lt;/code&gt; and adding defensive dictionary fallbacks in &lt;code&gt;api/index.py&lt;/code&gt; resolved the crash.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verification and Test Suite
&lt;/h3&gt;

&lt;p&gt;To guarantee reliability, the codebase includes an automated test suite:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;54 passed tests&lt;/strong&gt; across 4 modules (&lt;code&gt;test_analyzer.py&lt;/code&gt;, &lt;code&gt;test_chat_intel.py&lt;/code&gt;, &lt;code&gt;test_llm.py&lt;/code&gt;, &lt;code&gt;test_new_features.py&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;27.22 seconds&lt;/strong&gt; execution time under &lt;code&gt;pytest&lt;/code&gt; 8.3.4 on Python 3.13.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Evaluating open models like Gemma against closed APIs highlights key architectural differences:&lt;/p&gt;

&lt;h3&gt;
  
  
  Can It Run on a Laptop with No Internet?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Yes.&lt;/strong&gt; On an ordinary laptop (tested on AMD Ryzen 5 6600H, 16 GB RAM, NVIDIA GeForce RTX 3050 6GB Laptop GPU), the open &lt;code&gt;gemma4:e4b&lt;/code&gt; model (6.6 GB) runs locally via Ollama with CUDA acceleration. The inference pipeline processes queries without an active network connection, keeping the scanner functional during connectivity outages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep Data Off a Server I Don't Control?
&lt;/h3&gt;

&lt;p&gt;This is critical for family privacy. When an older person receives a suspicious message, it often contains personal details: partial account numbers, their home address, or their phone number. With closed APIs, every screenshot and text snippet must be transmitted to an external corporate endpoint. In ScamShield's local mode, images are processed in memory on localhost and never leave the device.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note on hosted demo vs local mode&lt;/em&gt;: The public Vercel demo connects to Google's API endpoint over HTTPS so anyone can try the tool without downloading 6 GB weights. However, local mode keeps all processing confined to the user's machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Swap Models, Fine-Tune, and Customize Behavior
&lt;/h3&gt;

&lt;p&gt;With open weights, developers are never locked into vendor policy shifts or deprecation schedules. If a regional scam vector appears, Gemma can be fine-tuned on regional dialects (such as Gujarati or Marathi SMS patterns) and served on an edge device without requesting third-party permission.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cost
&lt;/h3&gt;

&lt;p&gt;Running Gemma locally costs &lt;strong&gt;$0.00&lt;/strong&gt; in API fees. For community initiatives, senior centers, or public libraries providing scam verification kiosks, operating without ongoing per-token billing makes continuous protection sustainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Empirical Label Agreement and Latency
&lt;/h3&gt;

&lt;p&gt;I ran ScamShield's built-in synthetic test vectors through the Gemma pipeline to measure classification consistency and latency:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test Sample&lt;/th&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Expected Verdict&lt;/th&gt;
&lt;th&gt;Gemma Verdict&lt;/th&gt;
&lt;th&gt;Risk Score&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;th&gt;Agreement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;safe_login_otp.png&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Amazon 2FA Login&lt;/td&gt;
&lt;td&gt;SAFE&lt;/td&gt;
&lt;td&gt;SAFE&lt;/td&gt;
&lt;td&gt;5 / 100&lt;/td&gt;
&lt;td&gt;14.84s&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;safe_bank_alert.png&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HDFC Debit Alert&lt;/td&gt;
&lt;td&gt;SAFE&lt;/td&gt;
&lt;td&gt;SAFE&lt;/td&gt;
&lt;td&gt;5 / 100&lt;/td&gt;
&lt;td&gt;7.59s&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kyc_scam.png&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;SBI Account Block&lt;/td&gt;
&lt;td&gt;SCAM&lt;/td&gt;
&lt;td&gt;SCAM&lt;/td&gt;
&lt;td&gt;98 / 100&lt;/td&gt;
&lt;td&gt;6.98s&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lottery_scam.png&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;WhatsApp Lucky Draw&lt;/td&gt;
&lt;td&gt;SCAM&lt;/td&gt;
&lt;td&gt;SCAM&lt;/td&gt;
&lt;td&gt;100 / 100&lt;/td&gt;
&lt;td&gt;8.55s&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Across all tested samples, the model achieved &lt;strong&gt;100% agreement&lt;/strong&gt; with expected classifications, with a median latency of &lt;strong&gt;8.07 seconds&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where Open Beat Closed
&lt;/h3&gt;

&lt;p&gt;Open technology won here because of &lt;strong&gt;resilience under failure&lt;/strong&gt;. When closed APIs hit billing limits, experience regional outages, or block prompts with overly aggressive filters, closed applications break. With ScamShield's dual-tier architecture, if the cloud endpoint fails, the application falls back to a locally running Gemma instance without interrupting the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Can't Do Yet &amp;amp; What's Next
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A Real Handover to Older Users&lt;/strong&gt;: The immediate next step is sitting down with my dadi to watch her navigate the interface. Observing where she hesitates, which button labels confuse her, and whether the text size is comfortable will guide the next release.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native Mobile App Wrapper&lt;/strong&gt;: Right now ScamShield is a responsive Progressive Web App. Packaging it as an Android APK will let older users share screenshots directly via Android's native "Share" menu.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Offline OCR&lt;/strong&gt;: Currently, local vision analysis requires a multimodal model. Adding lightweight local Tesseract OCR as a pre-filter will enable instant text extraction on low-end phones before model inference.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Best Use of Gemma
&lt;/h3&gt;

&lt;p&gt;ScamShield competes in the &lt;strong&gt;Best Use of Gemma&lt;/strong&gt; category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Vision Reasoning&lt;/strong&gt;: Uses &lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt; to analyze incoming screenshot artifacts, identifying coercive visual cues and deceptive sender branding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Edge Capability&lt;/strong&gt;: Supports offline execution via &lt;code&gt;gemma4:e4b&lt;/code&gt; on Ollama, proving that advanced cyber protection can run on consumer laptop hardware without leaking private messages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thought Token Management &amp;amp; Extraction&lt;/strong&gt;: Implements dedicated handling for Gemma's internal reasoning tokens to deliver clean, structured JSON verdicts and actionable emergency checklists.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>Building Vidya: A Production-Grade Multi-Agent Voice Cyber-Tutor with Murf Falcon &amp; LiveKit</title>
      <dc:creator>Farhan</dc:creator>
      <pubDate>Fri, 14 Aug 2026 19:55:44 +0000</pubDate>
      <link>https://dev.to/farhans123456/building-vidya-a-production-grade-multi-agent-voice-cyber-tutor-with-murf-falcon-livekit-4bh6</link>
      <guid>https://dev.to/farhans123456/building-vidya-a-production-grade-multi-agent-voice-cyber-tutor-with-murf-falcon-livekit-4bh6</guid>
      <description>&lt;p&gt;&lt;em&gt;A complete engineering retrospective on building an ultra-low-latency voice AI tutor with specialist handoffs, vector RAG, SQLite memory, live tools, telephony, and real-time analytics for the Murf 10 Days Voice Agent Challenge (#VoiceForBharat).&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Problem: Voice-First Learning for Bharat
&lt;/h2&gt;

&lt;p&gt;In many regions across Bharat (India), millions of students and adult learners face a dual barrier: &lt;strong&gt;digital literacy hurdles&lt;/strong&gt; and &lt;strong&gt;fear of judgment&lt;/strong&gt; when asking basic questions. Traditional screen-based interfaces require typing, navigating complex menus, and reading dense text — creating unnecessary friction. Moreover, classroom environments often intimidate students who struggle with foundational concepts like arithmetic, grammar, or digital safety (UPI payments, OTP scams, phishing).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Voice changes everything.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Conversational voice AI provides a zero-friction, patient, and infinitely encouraging tutor that meets students where they are. That was my mission for the &lt;strong&gt;Learning &amp;amp; Literacy&lt;/strong&gt; track of the &lt;strong&gt;Murf 10 Days Voice Agent Challenge&lt;/strong&gt;: to build &lt;strong&gt;Vidya&lt;/strong&gt;, an intelligent Cyber-Tutor that speaks with a natural Indian accent, remembers learners across sessions, pulls verified facts from curriculum vector databases and live APIs, hands off complex math to a dedicated specialist, and even places proactive telephony practice calls.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. System Architecture: How It All Works
&lt;/h2&gt;

&lt;p&gt;Building a real-time conversational agent requires orchestrating four critical layers with sub-second latency:&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph ClientLayer["🖥️ Frontend Client (Next.js 16 + React 19)"]
        UI["Cyberpunk Matrix Grid Audio Visualizer (30x30)"]
        Dash["📊 Real-Time Call Telemetry Dashboard (/dashboard)"]
    end

    subgraph TransportLayer["⚡ Real-Time Transport (LiveKit WebRTC)"]
        LK["LiveKit Audio &amp;amp; Data Pipeline"]
    end

    subgraph AgentLayer["🧠 Multi-Agent Voice Pipeline"]
        VAD["Silero VAD + Turn Detector"]
        STT["Deepgram Nova-3 (en-IN)"]

        subgraph Agents["Specialist Handoff Engine"]
            Vidya["Primary Agent: Vidya\n(General &amp;amp; Literacy Tutor)\nMurf Voice: Anisha"]
            Kash["Specialist Agent: Kash\n(Advanced Mathematics)\nMurf Voice: en-US-matthew"]
            Vidya -.-&amp;gt;|Dynamic Silent Handoff\nwith ChatContext| Kash
        end

        TTS["Murf Falcon Streaming TTS\n(55ms Latency)"]
    end

    subgraph Subsystems["💾 Knowledge, Memory &amp;amp; Tooling"]
        RAG["ChromaDB Vector Store\n(Curriculum RAG)"]
        MemDB["SQLite agent_memory.db\n(Student Profile &amp;amp; Analytics)"]
        Tools["Live Tools:\n• Wikipedia API\n• Dictionary API\n• ExchangeRate API\n• Discord Escalation\n• SIP Softphone"]
    end

    UI &amp;lt;--&amp;gt;|WebRTC Stream| LK
    LK &amp;lt;--&amp;gt; VAD
    VAD --&amp;gt; STT
    STT --&amp;gt; Vidya
    Vidya &amp;lt;--&amp;gt; RAG
    Vidya &amp;lt;--&amp;gt; MemDB
    Vidya &amp;lt;--&amp;gt; Tools
    Vidya --&amp;gt; TTS
    Kash --&amp;gt; TTS
    TTS --&amp;gt; LK
    MemDB -.-&amp;gt;|Auto-sync| Dash&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  The Pipeline in Numbers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Streaming TTS&lt;/strong&gt;: &lt;a href="https://murf.ai/falcon" rel="noopener noreferrer"&gt;Murf Falcon&lt;/a&gt; with &lt;strong&gt;55ms model latency&lt;/strong&gt; and &lt;strong&gt;130ms Time-to-First-Audio (TTFA)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;STT&lt;/strong&gt;: Deepgram Nova-3 optimized for &lt;strong&gt;&lt;code&gt;en-IN&lt;/code&gt;&lt;/strong&gt; (Indian English).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM&lt;/strong&gt;: Local Ollama (&lt;code&gt;gemma4:31b-cloud&lt;/code&gt;), Google Gemini (&lt;code&gt;gemini-2.5-flash&lt;/code&gt;), or OpenAI (&lt;code&gt;gpt-4o&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transport&lt;/strong&gt;: LiveKit WebRTC audio transport with Silero VAD and Multilingual Turn Detection.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Key Features Built Across the 10-Day Journey
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Ultra-Low Latency Indian Voice with Murf Falcon
&lt;/h3&gt;

&lt;p&gt;Using Murf Falcon's streaming TTS, Vidya speaks with &lt;code&gt;Anisha&lt;/code&gt; — a warm, natural Indian English voice. To eliminate conversational pauses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tokenizer sentence threshold tuned to &lt;code&gt;min_sentence_len=10&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;text_pacing=False&lt;/code&gt; to strip synthetic delays.&lt;/li&gt;
&lt;li&gt;Preemptive generation enabled on LiveKit sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Multi-Agent Specialist Handoff (Vidya $\rightarrow$ Kash)
&lt;/h3&gt;

&lt;p&gt;When a student asks for higher-level mathematics (calculus, trigonometry, algebra drills), Vidya dynamically executes a specialist handoff to &lt;strong&gt;Kash&lt;/strong&gt; (voiced by Murf Falcon's &lt;code&gt;en-US-matthew&lt;/code&gt;):&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="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Transfer the user to the Mathematics Specialist. Call this ONLY when the user asks for advanced math practice or has a complex mathematical question.&lt;/span&gt;&lt;span class="sh"&gt;"&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_maths_specialist&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;ctx&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="n"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&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 to Maths Specialist&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Propagate the full conversation context so the user doesn't repeat themselves!
&lt;/span&gt;    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;MathsSpecialist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;room&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;room&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;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Curriculum RAG with ChromaDB
&lt;/h3&gt;

&lt;p&gt;To prevent hallucinations on syllabus topics (digital safety laws, grammar rules, arithmetic), curriculum markdown documents in &lt;code&gt;backend/data/&lt;/code&gt; are chunked and ingested into a local ChromaDB vector collection (&lt;code&gt;syllabus&lt;/code&gt;). When queried, Vidya grounds her explanations in verified curriculum context.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Silent Long-Term Memory (SQLite)
&lt;/h3&gt;

&lt;p&gt;Vidya tracks user facts, names, and interaction histories in &lt;code&gt;agent_memory.db&lt;/code&gt;. When you reconnect, Vidya retrieves your profile before speaking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Hello Farhan, how are you? Welcome back to our English practice!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Live Tool Integrations &amp;amp; Chaos Resilience
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Wikipedia Encyclopedia API&lt;/strong&gt;: Instant retrieval of historical and scientific facts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Dictionary API&lt;/strong&gt;: Word definitions, parts of speech, and pronunciation examples.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time FX Rates (&lt;code&gt;api.exchangerate-api.com&lt;/code&gt;)&lt;/strong&gt;: Live currency math problems with date stamps and graceful offline fallback if network calls fail.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Human Escalation Support (Discord Webhook)
&lt;/h3&gt;

&lt;p&gt;If a student gets severely frustrated or explicitly asks for a human teacher, Vidya confirms consent, generates a support reference ID (&lt;code&gt;VIDYA-TKT-XXX&lt;/code&gt;), and pushes an alert directly to a Discord teacher channel.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Telephony (Inbound &amp;amp; Outbound SIP)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inbound Agent&lt;/strong&gt;: Answers phone calls via LiveKit SIP trunks, extracts caller ID, applies &lt;code&gt;BVCTelephony&lt;/code&gt; noise cancellation, and allows warm human transfers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbound Agent&lt;/strong&gt;: Dials proactive practice calls, detects answering machines, and handles SIP error codes (&lt;code&gt;486 Busy&lt;/code&gt; $\rightarrow$ 1h retry, &lt;code&gt;408 No Answer&lt;/code&gt; $\rightarrow$ 4h retry, &lt;code&gt;603 Declined&lt;/code&gt; $\rightarrow$ cancel &amp;amp; log to SQLite).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  8. Cyberpunk Telemetry Dashboard (&lt;code&gt;/dashboard&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;A dedicated Next.js dashboard polls &lt;code&gt;/analytics.json&lt;/code&gt; (auto-synced from SQLite) every 5 seconds to track total sessions, successful learning uplinks, and dropped calls in real time.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Engineering Challenges &amp;amp; How I Solved Them
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Challenge 1: The Multi-Language STT Latency Trap
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: Initially, using multi-language STT (&lt;code&gt;language="multi"&lt;/code&gt;) caused noticeable speech-recognition lag, creating awkward conversational gaps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Root Cause&lt;/strong&gt;: Universal multilingual models are significantly heavier and require extra time to classify the language before transcribing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Explicitly locked Deepgram STT to &lt;code&gt;language="en-IN"&lt;/code&gt; with &lt;code&gt;smart_format=True&lt;/code&gt;. STT latency dropped by over 40%, making turn-taking instantaneous.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenge 2: Context Wipe During Specialist Agent Handoff
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: When Vidya handed off to Kash, the math specialist started with a blank slate, asking the student to repeat what problem they were working on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Passed &lt;code&gt;chat_ctx=ctx.session._chat_ctx&lt;/code&gt; from the parent agent's &lt;code&gt;RunContext&lt;/code&gt; directly into the &lt;code&gt;MathsSpecialist&lt;/code&gt; constructor. Kash seamlessly picked up the exact sentence and numbers the student was discussing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenge 3: Live API Hangs in Real-Time Voice Loops
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: External HTTP calls (like exchange rate APIs) can hang on flaky connections. A 10-second network delay in a voice agent feels like an eternity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Wrapped external requests in strict 5-second socket timeouts with custom try/except error recovery blocks. Created chaos test scripts (&lt;code&gt;break_api.py&lt;/code&gt; and &lt;code&gt;fix_api.py&lt;/code&gt;) to verify that Vidya gracefully apologizes and steers the student to another topic instead of hanging.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Build Your Own Voice Agent: Step-by-Step Guide
&lt;/h2&gt;

&lt;p&gt;Want to build your own real-time voice agent? Here is the exact blueprint.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python 3.10+&lt;/strong&gt; &amp;amp; &lt;strong&gt;&lt;a href="https://docs.astral.sh/uv/" rel="noopener noreferrer"&gt;uv&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js 18+&lt;/strong&gt; &amp;amp; &lt;strong&gt;pnpm&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Accounts &amp;amp; API keys for:

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://murf.ai/api/dashboard" rel="noopener noreferrer"&gt;Murf Falcon&lt;/a&gt; (Streaming TTS)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://deepgram.com" rel="noopener noreferrer"&gt;Deepgram&lt;/a&gt; (STT)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.livekit.io" rel="noopener noreferrer"&gt;LiveKit Cloud&lt;/a&gt; (WebRTC Transport)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aistudio.google.com" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt; or &lt;a href="https://platform.openai.com" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; (LLM)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. 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/your-org/vidya-ai-tutor.git
&lt;span class="nb"&gt;cd &lt;/span&gt;vidya-ai-tutor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Configure Environment Variables
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;.env.local&lt;/code&gt; in &lt;code&gt;backend/&lt;/code&gt; and &lt;code&gt;frontend/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

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

# Voice &amp;amp; AI Keys
MURF_API_KEY=your_murf_api_key
DEEPGRAM_API_KEY=your_deepgram_api_key
GOOGLE_API_KEY=your_google_api_key

# Optional Integrations
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Ingest Knowledge &amp;amp; Download Models
&lt;/h3&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/rag_ingest.py              &lt;span class="c"&gt;# Ingest curriculum into ChromaDB&lt;/span&gt;
uv run python src/agent.py download-files    &lt;span class="c"&gt;# Download Silero VAD models&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Launch All Services
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows (with High-Performance CPU tuning)&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\start_app.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;macOS / Linux&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;chmod&lt;/span&gt; +x start_app.sh
  ./start_app.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;strong&gt;&lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/strong&gt; in your browser, click &lt;strong&gt;INITIATE LEARNING MODULE&lt;/strong&gt;, and speak into your microphone!&lt;/p&gt;




&lt;h2&gt;
  
  
  6. What's Next for Vidya?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Video Screen Annotation&lt;/strong&gt;: Adding LiveKit video input so Vidya can visually inspect handwritten math equations on a student's notebook.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multilingual Vernacular Voices&lt;/strong&gt;: Expanding into Hindi, Tamil, Telugu, and Bengali voice models using Murf Falcon's multilingual library.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated WhatsApp Progress Reports&lt;/strong&gt;: Dispatching summary cards and practice reminders to parents after each voice tutoring session.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Links &amp;amp; Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/your-org/vidya-ai-tutor" rel="noopener noreferrer"&gt;https://github.com/your-org/vidya-ai-tutor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Murf Falcon TTS Docs&lt;/strong&gt;: &lt;a href="https://murf.ai/api/docs/text-to-speech/streaming" rel="noopener noreferrer"&gt;https://murf.ai/api/docs/text-to-speech/streaming&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LiveKit Agents SDK&lt;/strong&gt;: &lt;a href="https://docs.livekit.io/agents" rel="noopener noreferrer"&gt;https://docs.livekit.io/agents&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Built with passion during the #VoiceForBharat 10 Days Voice Agent Challenge powered by Murf AI.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>voice</category>
    </item>
  </channel>
</rss>
