<?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: Vishwaksen Reddy Dhareddy</title>
    <description>The latest articles on DEV Community by Vishwaksen Reddy Dhareddy (@vishwaksen1).</description>
    <link>https://dev.to/vishwaksen1</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%2F1283747%2F62cb684d-05c1-4c05-9035-01ba84c782ba.jpeg</url>
      <title>DEV Community: Vishwaksen Reddy Dhareddy</title>
      <link>https://dev.to/vishwaksen1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishwaksen1"/>
    <language>en</language>
    <item>
      <title>Audio Steganography, Faster and Friendlier: My Dive into Spectrogram</title>
      <dc:creator>Vishwaksen Reddy Dhareddy</dc:creator>
      <pubDate>Sat, 10 May 2025 14:49:39 +0000</pubDate>
      <link>https://dev.to/vishwaksen1/audio-steganography-faster-and-friendlier-my-dive-into-spectrogram-1i0l</link>
      <guid>https://dev.to/vishwaksen1/audio-steganography-faster-and-friendlier-my-dive-into-spectrogram-1i0l</guid>
      <description>&lt;p&gt;A few days ago, I stumbled across an interesting blog post by &lt;a href="https://solusipse.net/blog/post/basic-methods-of-audio-steganography-spectrograms/" rel="noopener noreferrer"&gt;Solusipse&lt;/a&gt; about hiding images in sound—more specifically, encoding them into the spectrogram of an audio file. It reminded me of old-school tech like dial-up modems and the ZX Spectrum, but with a modern twist.&lt;/p&gt;

&lt;p&gt;Naturally, I had to try it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started... and Stuck
&lt;/h2&gt;

&lt;p&gt;Solusipse provides a Python script, &lt;code&gt;spectrology.py&lt;/code&gt;, that takes an image and converts it into an audio waveform whose spectrogram visually resembles the image. I cloned the repo, followed the &lt;code&gt;README&lt;/code&gt;, and ran the script, hoping for a cool output.&lt;/p&gt;

&lt;p&gt;But things weren’t so smooth. The script hit an error out of the gate. Can't blame them, the code was over 10 years old 💀.&lt;/p&gt;

&lt;p&gt;After a not-so-long debugging session, I got it working. It finally produced an audio file containing a hidden image. Success—sort of. The problem was speed. For a basic test image, the script took around 200 seconds to finish. That’s a long wait when you're used to near-instant everything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Making It Fast
&lt;/h3&gt;

&lt;p&gt;I noticed that the script processed image columns sequentially, one after another. This was a perfect candidate for parallel processing, so I refactored the code using Python &lt;code&gt;ThreadPoolExecutor&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After that, the same task took just 12 seconds.&lt;/p&gt;

&lt;p&gt;To make it even more convenient, I bundled it into a standalone Linux executable using &lt;code&gt;PyInstaller&lt;/code&gt;. Now I can add and run it directly from my KDE desktop menu on Arch without worrying about Python environments or dependencies.&lt;/p&gt;

&lt;p&gt;All of this is available here:&lt;br&gt;
🔗 &lt;a href="https://github.com/vishwaksen-1/audioStegano" rel="noopener noreferrer"&gt;audioStegano on GitHub&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  A Bit of Experimenting
&lt;/h2&gt;

&lt;p&gt;Once the tooling was set, I spent some time exploring the possibilities—just like in the original blog. I played around with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Different frequency bands (e.g., 13 kHz to 19 kHz)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tweaking pixels-per-second and sampling rates&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mixing the output into music tracks using Audacity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adjusting gain levels to hide the encoded message more subtly&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the more effective tricks was splitting stereo channels—putting the music in the left and the hidden image in the right. That way, regular listening doesn't reveal anything unusual, but the image is still recoverable from the spectrogram.&lt;br&gt;
(P.S. I'm not going into detail, as I feel the original post is plenty in itself, and I think curious readers will certainly go there 🙂)&lt;/p&gt;

&lt;p&gt;Here’s what the project structure looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;audioStegano
├── &lt;span class="nb"&gt;exec&lt;/span&gt;/               &lt;span class="c"&gt;# Executable + build requirements&lt;/span&gt;
├── extra/              &lt;span class="c"&gt;# Sample input and output files&lt;/span&gt;
├── spectrology.py      &lt;span class="c"&gt;# The main encoder script&lt;/span&gt;
├── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And yes, there's full support for rebuilding the executable with just a couple of commands. The &lt;code&gt;README&lt;/code&gt; has all the details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Closing Thoughts
&lt;/h3&gt;

&lt;p&gt;This was a fun and insightful mini-project. It began with a blog post and ended with a faster, cleaner, and more usable tool for audio steganography. If you’re curious about signal processing, creative encoding, or just enjoy playing with unconventional media, this is definitely worth exploring.&lt;/p&gt;

&lt;p&gt;The original post is a great read, and if you want to try it yourself, you can grab the tool here:&lt;br&gt;
👉 &lt;a href="https://github.com/vishwaksen-1/audioStegano" rel="noopener noreferrer"&gt;https://github.com/vishwaksen-1/audioStegano&lt;/a&gt;&lt;br&gt;
Or the original sequential processing code by SOLUSIPSE:&lt;br&gt;
👉 &lt;a href="https://github.com/solusipse/spectrology" rel="noopener noreferrer"&gt;https://github.com/solusipse/spectrology&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stegano</category>
      <category>programming</category>
      <category>python</category>
      <category>music</category>
    </item>
  </channel>
</rss>
