<?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: Samar Shetye</title>
    <description>The latest articles on DEV Community by Samar Shetye (@samar_shetye).</description>
    <link>https://dev.to/samar_shetye</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%2F3755023%2F12f019fd-d194-4291-905e-f08c7a96a3dc.jpg</url>
      <title>DEV Community: Samar Shetye</title>
      <link>https://dev.to/samar_shetye</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samar_shetye"/>
    <language>en</language>
    <item>
      <title>Breaking the Language Barrier When Truth Matters Most</title>
      <dc:creator>Samar Shetye</dc:creator>
      <pubDate>Sun, 15 Mar 2026 20:37:37 +0000</pubDate>
      <link>https://dev.to/samar_shetye/breaking-the-language-barrier-when-truth-matters-most-5b5o</link>
      <guid>https://dev.to/samar_shetye/breaking-the-language-barrier-when-truth-matters-most-5b5o</guid>
      <description>&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%2F3vflnuthwzot6o6tyz11.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%2F3vflnuthwzot6o6tyz11.png" alt=" "&gt;&lt;/a&gt;When global conflicts ignite, the first casualty is often the truth. Local propaganda machines spin narratives, external news sites are blocked, and critical updates from international journalists remain trapped behind a massive barrier: language.&lt;/p&gt;

&lt;p&gt;Before I started coding LingualNews, my "blank canvas" was shaped by this massive information asymmetry. I needed to build a solution using a fast frontend (React/Vite) wrapped around a tight set of APIs (Lingo.dev and Groq) with one core mission: What if anyone, anywhere, could paste a URL from any global news outlet and instantly read—or listen to it—in their native tongue?&lt;/p&gt;

&lt;p&gt;The problem I am solving is access to unfiltered reality. LingualNews makes the world a better place by ensuring that truth is never paywalled by your geographic location or the language you happen to speak.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The High-Level Architecture&lt;/strong&gt;&lt;br&gt;
Think of LingualNews as a "Smart Proxy Funnel." You input a foreign news URL. The React client dynamically bypasses CORS constraints through fallback proxies. The raw chaotic HTML is cleaned by a heuristic DOM scraper, stripping away ads and noise. The isolated text is then pushed into a dual-engine AI pipeline: Lingo.dev handles the precise translation, while Groq (LLaMA 3.1) generates concise summaries and acts as a translation fallback. Finally, Native Web Speech APIs vocalize the translated text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where the "Magic" Happens&lt;/strong&gt;&lt;br&gt;
The real magic lives in scraperService.js and translationService.js. These modules transform chaotic, unstructured, ad-riddled foreign websites into clean, localized, readable components in milliseconds.&lt;/p&gt;

&lt;p&gt;If I had to isolate the biggest technical breakthrough in the app, it's just a few lines of code in the translation layer. During a geopolitical crisis, traffic spikes. APIs fail. If my primary translation API drops, my app cannot break.&lt;/p&gt;

&lt;p&gt;Here is my breakthrough, explained line-by-line:&lt;/p&gt;

&lt;p&gt;javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Lingo.dev translation failed, falling back to Groq:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="c1"&gt;// Fallback to Groq&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;translateWithGroq&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./aiService.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; 
      &lt;span class="nf"&gt;translateWithGroq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;targetLang&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;catch (err): We intercept any failure from the primary Lingo.dev API.&lt;/li&gt;
&lt;li&gt;console.warn(...): Gracefully log the error without crashing the user's interface.&lt;/li&gt;
&lt;li&gt;const { translateWithGroq } = await import(...): This is the secret sauce. Instead of loading the heavy AI service upfront, we dynamically lazy-load the Groq module only if Lingo.dev fails. This keeps the initial bundle size incredibly small and fast.&lt;/li&gt;
&lt;li&gt;return await translateWithGroq(...): We leverage LLaMA 3.1 via Groq to step in as a secondary line of defense, ensuring the user instantly gets their localized news, no matter what.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Most Frustrating Bug&lt;/strong&gt;&lt;br&gt;
My biggest headache? Integrating the official Lingo.dev SDK. It was built for Node environments and threw obscure bundling errors that completely broke the Vite build. The undocumented, obscure fix? I threw away the official SDK entirely. I reverse-engineered their REST endpoint out of their docs and crafted a raw fetch POST request with a custom X-API-Key header. Sometimes, raw HTTP beats a polished SDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When Clean Design Met Messy Reality&lt;/strong&gt;&lt;br&gt;
My initial, clean design assumed a simple querySelector('article') would cleanly extract text from any news site perfectly. The reality? Web scraping is a nightmare of custom ad-blockers, captchas, and chaotic div nests.&lt;/p&gt;

&lt;p&gt;My clean design broke immediately. I was forced to write a massive, messy array of heuristic CSS selectors and "noise" filters (.cookie-banner, .advertisement). When all else fails, I built a highly functional workaround: dumping the raw HTML directly into Groq AI with a strict prompt: "Return ONLY the article body text."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical Debt &amp;amp; Trade-Offs&lt;/strong&gt;&lt;br&gt;
To cross the finish line quickly, I accepted a notable piece of technical debt: embedding API keys in the frontend environment (import.meta.env). While Vite obscures them in dev, client-side fetches are risky at scale. I accepted this to launch a fast MVP, knowing I can shift to edge functions in V2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try It Yourself&lt;/strong&gt;&lt;br&gt;
You can run this locally with practically zero friction:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Samar-365/LingualNews
&lt;span class="nb"&gt;cd &lt;/span&gt;LingualNews
npm &lt;span class="nb"&gt;install
&lt;/span&gt;Add your .env with VITE_GROQ_API_KEY and VITE_LINGO_API_KEY
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What’s Next?&lt;/strong&gt;&lt;br&gt;
If you fork this repository today, the most obvious missing piece to build is Offline PWA Support (Service Workers). Reading the news shouldn't require a constant, stable internet connection—especially for users in volatile regions. Local caching features could dramatically improve this app's life-saving potential.&lt;/p&gt;

&lt;p&gt;Code is more than syntax; it's how we connect the world. What are you building today?&lt;/p&gt;

&lt;p&gt;Check out the repo at &lt;a href="https://github.com/Samar-365/LingualNews" rel="noopener noreferrer"&gt;https://github.com/Samar-365/LingualNews&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Special thanks to &lt;a class="mentioned-user" href="https://dev.to/sumitsaurabh927"&gt;@sumitsaurabh927&lt;/a&gt; and &lt;a class="mentioned-user" href="https://dev.to/maxprilutskiy"&gt;@maxprilutskiy&lt;/a&gt; for their continuous guidance throughout the hackathon and also for providing us this great opportunity.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>lingodotdev</category>
      <category>ai</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Stop Copy-Pasting from Images: Build a Universal Screen Translator with Python</title>
      <dc:creator>Samar Shetye</dc:creator>
      <pubDate>Thu, 05 Feb 2026 18:33:50 +0000</pubDate>
      <link>https://dev.to/samar_shetye/stop-copy-pasting-from-images-build-a-universal-screen-translator-with-python-54gm</link>
      <guid>https://dev.to/samar_shetye/stop-copy-pasting-from-images-build-a-universal-screen-translator-with-python-54gm</guid>
      <description>&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%2F5wmxocgu79vtbsp75oh7.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%2F5wmxocgu79vtbsp75oh7.png" alt=" " width="750" height="275"&gt;&lt;/a&gt;&lt;strong&gt;Lingo-Live&lt;/strong&gt; started with a frustration I’m sure you’ve felt too.&lt;/p&gt;

&lt;p&gt;Have you ever tried copying text from a YouTube video?&lt;br&gt;
Or translating a Japanese error message inside a game?&lt;/p&gt;

&lt;p&gt;Yeah. You can’t.&lt;br&gt;
Because it’s not text — it’s just pixels.&lt;/p&gt;

&lt;p&gt;Most of us end up doing one of two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;painfully typing everything by hand, or&lt;/li&gt;
&lt;li&gt;pulling out our phones and using Google Lens, holding it up to the screen like it’s 2010.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s clunky. It breaks focus. And honestly, we can do better.&lt;/p&gt;

&lt;p&gt;So I built Lingo-Live — a sleek desktop app that lets you translate anything you see on your screen instantly.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Superpower We Wanted
&lt;/h2&gt;

&lt;p&gt;I didn’t want just another translation app. I wanted something that felt like a superpower.&lt;/p&gt;
&lt;h2&gt;
  
  
  That meant it had to be:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Invisible – runs quietly in the background&lt;/li&gt;
&lt;li&gt;Instant – hit a hotkey, select an area, get a translation&lt;/li&gt;
&lt;li&gt;Modern – glassy UI, dark mode, blur effects, no Windows-95 vibes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Press Ctrl + Alt + T, drag over any part of your screen, and boom — translated text appears on top of whatever you’re doing.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Secret Sauce: How Lingo-Live Works
&lt;/h2&gt;

&lt;p&gt;Python made this possible. It’s basically a Swiss Army knife for building tools like this.&lt;/p&gt;

&lt;p&gt;Here’s how everything comes together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The “Glass” Overlay&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The trickiest part was creating a window that stays on top without being annoying.&lt;/p&gt;

&lt;p&gt;I used CustomTkinter to build a frameless, translucent overlay that feels light and modern.&lt;/p&gt;

&lt;p&gt;Key details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always on top so translations stay visible&lt;/li&gt;
&lt;li&gt;Semi-transparent so you can still see context underneath&lt;/li&gt;
&lt;li&gt;Frameless — no ugly title bar; custom drag-and-drop instead&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result feels less like an app and more like a layer on your desktop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The Eyes (OCR)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you trigger the hotkey, Lingo-Live doesn’t try to “read the screen.”&lt;/p&gt;

&lt;p&gt;Instead, it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lets you select a region&lt;/li&gt;
&lt;li&gt;Takes a screenshot of just that area&lt;/li&gt;
&lt;li&gt;Sends it to Tesseract OCR to extract text from the pixels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conceptually, it looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;screenshot = ImageGrab.grab(bbox=(x1, y1, x2, y2))
text = ocr_engine.extract_text(screenshot)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s where the magic starts — turning images into actual text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The Brain (Translation)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once OCR gives us something like こんにちは, we need a translation that actually makes sense.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;Lingo.dev&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;Instead of raw dictionary swaps, it handles context properly, which makes a huge difference — especially for UI text, error messages, and game dialogue.&lt;/p&gt;

&lt;p&gt;The result feels natural, not robotic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The Voice (Text-to-Speech)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes you don’t want to read. You just want to hear it.&lt;/p&gt;

&lt;p&gt;So I added Edge TTS, which uses the same high-quality voices found in Microsoft Edge.&lt;/p&gt;

&lt;p&gt;Now Lingo-Live can read translations out loud — great for pronunciation or just staying hands-free.&lt;/p&gt;

&lt;p&gt;“Fish are vertebrate animals that live in water…” &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Leveling Up: AI Summarization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Full translations are great, but sometimes you just want the gist.&lt;/p&gt;

&lt;p&gt;So I added a Summarize button powered by Google Gemini.&lt;/p&gt;

&lt;p&gt;Here’s what happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The translated text is sent to Gemini&lt;/li&gt;
&lt;li&gt;It returns a clean, one-sentence summary&lt;/li&gt;
&lt;li&gt;You get the point instantly
Perfect for skimming foreign articles, long error messages, or RPG dialogue dumps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Make It Yours: Settings That Actually Matter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I didn’t want Lingo-Live to feel rigid, so I built a full settings system backed by JSON.&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;p&gt;[- Change the hotkey (Alt + Z? Sure.)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Switch themes (dark mode is the correct choice)&lt;/li&gt;
&lt;li&gt;Pick different fonts (Roboto &amp;gt; Segoe UI, fight me)](url)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Best part?&lt;br&gt;
All changes apply instantly — no restarts, no reloads. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building your own tools is one of the most satisfying parts of being a developer.&lt;/p&gt;

&lt;p&gt;Lingo-Live solves a problem I run into constantly: text that’s trapped inside images, videos, and games. Instead of working around it, I built something that feels fast, modern, and genuinely useful.&lt;/p&gt;

&lt;p&gt;If you’ve ever rage-typed a foreign error message at 2 AM, this app is for you.&lt;/p&gt;

&lt;p&gt;Lingo.dev makes localization feel effortless—turning a painful, error-prone task into a smooth, developer-friendly experience.&lt;/p&gt;

&lt;p&gt;Check out the repo at &lt;a href="https://github.com/Samar-365/lingo_live" rel="noopener noreferrer"&gt;https://github.com/Samar-365/lingo_live&lt;/a&gt;, clone the code, and stop copy-pasting from pixels.&lt;/p&gt;

&lt;p&gt;Special thanks to &lt;a class="mentioned-user" href="https://dev.to/sumitsaurabh927"&gt;@sumitsaurabh927&lt;/a&gt; and &lt;a class="mentioned-user" href="https://dev.to/maxprilutskiy"&gt;@maxprilutskiy&lt;/a&gt; for their continuous guidance throughout the hackathon and also for providing us this great opportunity.&lt;/p&gt;

&lt;p&gt;Happy coding! &lt;/p&gt;

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