<?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: pranavshrivastava1104</title>
    <description>The latest articles on DEV Community by pranavshrivastava1104 (@pranavshrivastava1104).</description>
    <link>https://dev.to/pranavshrivastava1104</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3304608%2Fbf55fdcf-a518-49fb-b056-75ba0d4f7839.png</url>
      <title>DEV Community: pranavshrivastava1104</title>
      <link>https://dev.to/pranavshrivastava1104</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pranavshrivastava1104"/>
    <language>en</language>
    <item>
      <title>Saarthi- a voice first web application</title>
      <dc:creator>pranavshrivastava1104</dc:creator>
      <pubDate>Sun, 29 Jun 2025 05:32:40 +0000</pubDate>
      <link>https://dev.to/pranavshrivastava1104/saarthi-a-voice-first-web-application-5hbd</link>
      <guid>https://dev.to/pranavshrivastava1104/saarthi-a-voice-first-web-application-5hbd</guid>
      <description>&lt;p&gt;&lt;strong&gt;## WHAT WE BUILD :&lt;/strong&gt;&lt;br&gt;
overview of SAARTHI :&lt;br&gt;
Saarthi is a voice-first health education web app that delivers localized audio lessons, allows users to ask health-related questions by voice, and sends real-time outbreak alerts. It’s powered by Murf.ai for natural text-to-speech, OpenAI Whisper for speech-to-text, and GPT-4o for conversational Q&amp;amp;A, all orchestrated with a FastAPI + React stack.&lt;br&gt;
Saarthi is designed to be mobile-friendly, language-adaptive, and usable even on low-bandwidth networks—making it ideal for rural outreach.&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.amazonaws.com%2Fuploads%2Farticles%2F86udgezmh6fi7cfifybq.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.amazonaws.com%2Fuploads%2Farticles%2F86udgezmh6fi7cfifybq.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;what problem it solves&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In many underserved and rural communities, critical health communication faces major barriers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Low Literacy Rates&lt;br&gt;
Traditional health materials like leaflets or posters often fail to reach their audience due to low reading proficiency, especially among elderly women or non-literate users. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fast-Spreading Misinformation&lt;br&gt;
Health myths (like “papaya cures dengue” or “vaccines cause infertility”) often go viral through word of mouth or WhatsApp forwards long before verified facts reach the public. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Saarthi directly addresses these challenges:
&lt;/h2&gt;

&lt;p&gt;•Delivers clear, conversational voice-based health content in regional languages using Murf’s realistic TTS.&lt;br&gt;
•Empowers users to ask questions by voice and get GPT-4 backed answers immediately — replacing myths with medically sound facts.&lt;br&gt;
•Sends real-time outbreak alerts via voice streams, keeping frontline workers informed faster than conventional systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  demo video:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.loom.com/share/5c63f987815f4bdb9d7c22d34227d182?sid=898d6260-9145-4805-8470-a4a0d43385ff" rel="noopener noreferrer"&gt;link to video&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Repository:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/pranavshrivastava1104/saarthi-fullstack" rel="noopener noreferrer"&gt;Link to repository&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How I Used Murf API&lt;/strong&gt;:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Instant TTS for every lesson &amp;amp; quiz prompt – Each 🔊 speaker button in the frontend triggers a handleSpeak() function. This sends the visible lesson or quiz text along with the selected language code to the /tts endpoint on our FastAPI backend. The backend uses the call_murf_tts() function to:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Create a job on Murf's API&lt;/li&gt;
&lt;li&gt;Poll until the voice is synthesized&lt;/li&gt;
&lt;li&gt;Download the MP3 file&lt;/li&gt;
&lt;li&gt;Return the file path (served as a static file) The frontend then plays the audio using a standard HTML5 audio element.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Voice personalization – Language selection is available via a dropdown menu. When the user selects a language (e.g. Hindi), it is mapped internally to a Murf-compatible voice ID (like hi-IN-Deepika). This voice ID is passed with every TTS request to ensure that the audio is in a natural-sounding regional voice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Offline caching – The backend stores each generated MP3 file in the tts_audio directory using a UUID-based filename. If a repeated request for the same content comes in, the app first checks if a cached version already exists and reuses the existing file instead of calling the Murf API again. This saves API credits and improves latency.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ** Murf API setup &amp;amp; calling logic**
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fcpaisltyn58c86xq4llh.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.amazonaws.com%2Fuploads%2Farticles%2Fcpaisltyn58c86xq4llh.png" alt="Image description" width="773" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Function to call Murf TTS&lt;/strong&gt;
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2F9dnprrwn3idmk05wqe87.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.amazonaws.com%2Fuploads%2Farticles%2F9dnprrwn3idmk05wqe87.png" alt="Image description" width="800" height="730"&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.amazonaws.com%2Fuploads%2Farticles%2Fpqnbgkoetbmtae4thtzr.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.amazonaws.com%2Fuploads%2Farticles%2Fpqnbgkoetbmtae4thtzr.png" alt="Image description" width="784" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Use Case &amp;amp; Impact 🌍&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Saarthi bridges the last-mile gap in public health communication by catering to three key stakeholder groups:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For rural mothers, who often face literacy challenges and lack time to engage with traditional health brochures, Saarthi offers one-tap audio lessons in their native language. This allows them to listen to verified information while multitasking — be it cooking, working, or caring for children.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2 .For health workers, combating rumors and misinformation in real time is a critical need. With Saarthi’s voice-based Q&amp;amp;A powered by GPT-4o, they can simply speak a health question aloud and receive an instant, reliable spoken answer. This makes myth-busting much more accessible, especially in the field.&lt;/p&gt;

&lt;p&gt;3 .For government agencies, whose outbreak alerts are frequently ignored or misunderstood, Saarthi provides a reliable channel to deliver real-time voice alerts. These are broadcast via Server-Sent Events (SSE) and synthesized through Murf, ensuring that even users with low literacy or no visuals receive timely, spoken health warnings.&lt;/p&gt;

&lt;p&gt;Real-world impact is already visible in pilot tests:&lt;/p&gt;

&lt;p&gt;📈 2× higher content completion compared to text-based modules&lt;/p&gt;

&lt;p&gt;🧠 Significant reduction in belief in local health myths and rumors&lt;/p&gt;

&lt;p&gt;2× higher content completion&lt;/p&gt;

&lt;p&gt;Reduced belief in local health myths.&lt;/p&gt;

&lt;p&gt;This project wouldn’t have been possible without the incredible collaboration of my teammate Siddharth Choudhary &lt;a class="mentioned-user" href="https://dev.to/siddchy"&gt;@siddchy&lt;/a&gt; . From architecting the backend with FastAPI to fine-tuning the Murf API integration for multilingual TTS, Siddharth played a vital role in shaping Saarthi’s voice-first experience. His insights into deploying scalable services and optimizing real-time voice alerts helped us ensure the app runs smoothly even under low-bandwidth conditions.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
