<?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: Surya Prakash Sahu</title>
    <description>The latest articles on DEV Community by Surya Prakash Sahu (@thepurpleowl).</description>
    <link>https://dev.to/thepurpleowl</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%2F483292%2F1e60157f-b730-4140-abd9-c02a3c4511a6.jpeg</url>
      <title>DEV Community: Surya Prakash Sahu</title>
      <link>https://dev.to/thepurpleowl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thepurpleowl"/>
    <language>en</language>
    <item>
      <title>Data Compression: Under 256 characters</title>
      <dc:creator>Surya Prakash Sahu</dc:creator>
      <pubDate>Mon, 24 Jun 2024 03:48:48 +0000</pubDate>
      <link>https://dev.to/thepurpleowl/data-compression-under-256-characters-2jg1</link>
      <guid>https://dev.to/thepurpleowl/data-compression-under-256-characters-2jg1</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/cs"&gt;DEV Computer Science Challenge v24.06.12: One Byte Explainer&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Explainer
&lt;/h2&gt;

&lt;p&gt;Data compression is reducing bits needed to represent data.&lt;br&gt;
S:&lt;code&gt;she sees sea&lt;/code&gt;-needs 80bits(8bits/char).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;only 3 words&lt;/em&gt;(&lt;code&gt;she&lt;/code&gt;,&lt;code&gt;sees&lt;/code&gt;,&lt;code&gt;sea&lt;/code&gt;) exist, S:"&lt;u&gt;00&lt;/u&gt; &lt;u&gt;01&lt;/u&gt; &lt;u&gt;10&lt;/u&gt;"-6bits&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;all alphabets exist &amp;amp; S is only sentence&lt;/em&gt;, S:"&lt;u&gt;1&lt;/u&gt; &lt;u&gt;001&lt;/u&gt; &lt;u&gt;01&lt;/u&gt; &lt;u&gt;1&lt;/u&gt; &lt;u&gt;01&lt;/u&gt; &lt;u&gt;01&lt;/u&gt; &lt;u&gt;1&lt;/u&gt; &lt;u&gt;1&lt;/u&gt; &lt;u&gt;01&lt;/u&gt; &lt;u&gt;000&lt;/u&gt;"(Huffman coding)-18bits.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Additional Context
&lt;/h3&gt;




&lt;div class="ltag__wikipedia--container"&gt;
  &lt;div class="ltag__wikipedia--header"&gt;
    &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fwikipedia-logo-0a3e76624c7b1c3ccdeb9493ea4add6ef5bd82d7e88d102d5ddfd7c981efa2e7.svg" class="ltag__wikipedia--logo" alt="Wikipedia Logo"&gt;
    &lt;a href="https://en.wikipedia.org/wiki/Huffman_coding" rel="noopener noreferrer"&gt;Huffman coding&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="ltag__wikipedia--extract"&gt;&lt;p&gt;In computer science and information theory, a &lt;b&gt;Huffman code&lt;/b&gt; is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code is &lt;b&gt;Huffman coding&lt;/b&gt;, an algorithm developed by David A. Huffman while he was a Sc.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".&lt;/p&gt;&lt;/div&gt;
  &lt;div class="ltag__wikipedia--btn--container"&gt;
      &lt;a class="ltag__wikipedia--btn" href="https://en.wikipedia.org/wiki/Huffman_coding" rel="noopener noreferrer"&gt;View on Wikipedia&lt;/a&gt;&amp;gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>devchallenge</category>
      <category>cschallenge</category>
      <category>computerscience</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Helpline Triager: Your buddy during distress</title>
      <dc:creator>Surya Prakash Sahu</dc:creator>
      <pubDate>Sun, 23 Jun 2024 03:39:21 +0000</pubDate>
      <link>https://dev.to/thepurpleowl/helpline-triager-your-buddy-during-distress-1d7l</link>
      <guid>https://dev.to/thepurpleowl/helpline-triager-your-buddy-during-distress-1d7l</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/twilio"&gt;Twilio Challenge v24.06.12&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Helpline Triager&lt;/strong&gt;&lt;br&gt;
While reporting or seeking help in a distress situations, finding the appropriate help can be challenging. This project aims to streamline the process by providing a single helpline number that redirects caller-provided information to the relevant helpline. Such an approach address common obstacles faced during distress situations such as lack of internet access, reluctance to self-identify, and the precious time-consuming task of locating the correct helpline number. &lt;br&gt;
By offering a centralized and user-friendly solution, this project aims to facilitate prompt access to the necessary support during times of distress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technologies Used&lt;/strong&gt;&lt;br&gt;
Backend: Flask, gevent&lt;br&gt;
External APIs: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Twilio Api for messaging, call &lt;/li&gt;
&lt;li&gt;OpenAI Api for AI responses, Whisper for transcription&lt;/li&gt;
&lt;li&gt;Google text-to-speech for text to speech&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;



&lt;p&gt;As this is a backend app only, no front-end demo is present. One can easily integrate this as a service.&lt;/p&gt;

&lt;p&gt;Attaching one of the messages that received using this backend app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9subsvsyqmsyb0isj3u.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9subsvsyqmsyb0isj3u.jpeg" alt="Redirected message received from Helpline Triager" width="800" height="787"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Twilio and AI
&lt;/h2&gt;



&lt;p&gt;I leveraged Twilio's powerful communication APIs(both call and messaging API), to handle incoming calling calls in the backend app. The use of AI in the app is mostly two-fold&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Caller agent: An AI agent is used as both receiver (while getting distress call from end-user) and caller/message-sender (while directly appropriate helpline).&lt;/li&gt;
&lt;li&gt;Agent Prompts: Different agent prompts are used to - 
(a) identify distress type,
(b) extract important information, and
(c) summarize the distress call.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Additional Prize Categories
&lt;/h2&gt;



&lt;p&gt;This submission qualifies for the following additional prize categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Twilio Times Two&lt;/strong&gt;: The project utilizes both Twilio's calling and messaging APIs to enhance our Notion extension.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Impactful Innovators&lt;/strong&gt;: This project can make up the split-second advantage required to get the essential support during critical moments of distress such as fire, health emergency, theft, etc.&lt;/p&gt;
&lt;h2&gt;
  
  
  Github Repo
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/thepurpleowl"&gt;
        thepurpleowl
      &lt;/a&gt; / &lt;a href="https://github.com/thepurpleowl/Helpline_Triager"&gt;
        Helpline_Triager
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Use ChatGPT over Twilio to create an AI phone agent to redirect distress calls to relevant helpline.
    &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;Helpline Triager&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Use ChatGPT over Twilio to create an AI phone agent to redirect distress calls to relevant helpline.&lt;/p&gt;
&lt;p&gt;While reporting or seeking help in a distress situations, finding the appropriate help can be challenging. This project aims to streamline the process by providing a single helpline number that redirects caller-provided information to the relevant helpline
Such an approach address common obstacles faced during distress situations such as lack of internet access, reluctance to self-identify, and the precious time-consuming task of locating the correct helpline number
By offering a centralized and user-friendly solution, this project aims to facilitate prompt access to the necessary support during times of distress.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;How it works&lt;/h3&gt;

&lt;/div&gt;
&lt;p&gt;Twilio Webhook -&amp;gt; Flask app -&amp;gt; Twilio Media Stream (websocket) -&amp;gt; Whisper -&amp;gt; ChatGPT API -&amp;gt; Google TTS -&amp;gt; Twilio Play Audio&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;How to use&lt;/h3&gt;

&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;pip install -r requirements.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Set environment variables in &lt;code&gt;keys.env&lt;/code&gt; file&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;OPENAI_API_KEY=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=+1...&lt;/code&gt;&lt;/pre&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/thepurpleowl/Helpline_Triager"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


</description>
      <category>devchallenge</category>
      <category>twiliochallenge</category>
      <category>ai</category>
      <category>twilio</category>
    </item>
  </channel>
</rss>
