<?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: Fix My Speaker</title>
    <description>The latest articles on DEV Community by Fix My Speaker (@ifixmyspeaker).</description>
    <link>https://dev.to/ifixmyspeaker</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%2F4189401%2Fa55b137e-0e6e-4b4d-be01-f126f925e703.png</url>
      <title>DEV Community: Fix My Speaker</title>
      <link>https://dev.to/ifixmyspeaker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ifixmyspeaker"/>
    <language>en</language>
    <item>
      <title>Eject Water From Phone Speaker</title>
      <dc:creator>Fix My Speaker</dc:creator>
      <pubDate>Tue, 20 Oct 2026 15:28:47 +0000</pubDate>
      <link>https://dev.to/ifixmyspeaker/eject-water-from-phone-speaker-2328</link>
      <guid>https://dev.to/ifixmyspeaker/eject-water-from-phone-speaker-2328</guid>
      <description>&lt;p&gt;Drop your phone in the sink, and the first problem you notice is usually the sound. Music plays, but it feels &lt;strong&gt;muffled, quiet, and crackly&lt;/strong&gt; — as if the speaker is talking through a wet cloth. The good news: in many cases, nothing is broken. There is just water sitting in the speaker grill, and plain sound can push it out.&lt;/p&gt;

&lt;p&gt;This is the simple idea behind speaker-cleaning tools, including the free one I work on. In this post, I will explain &lt;strong&gt;why water ruins the sound, why a low 165Hz tone fixes it, and how you can generate that tone in the browser&lt;/strong&gt; with a few lines of JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Water Makes a Phone Speaker Sound Muffled
&lt;/h2&gt;

&lt;p&gt;A phone speaker is a tiny driver behind a fine mesh grill. To make sound, the speaker cone moves back and forth and pushes air. When water enters the grill, three things happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Water blocks the mesh&lt;/strong&gt;, so air cannot move freely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Droplets sit on the cone&lt;/strong&gt;, which makes it heavier and slower&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surface tension holds the water in place&lt;/strong&gt;, so it does not fall out on its own&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why shaking the phone rarely helps. The droplets are small, sticky, and trapped in a space that is only a few millimetres wide. You need something that pushes from the &lt;em&gt;inside&lt;/em&gt; — and that something is air pressure created by the speaker itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Trick: Turn the Speaker Into a Tiny Air Pump
&lt;/h2&gt;

&lt;p&gt;If the speaker cone moves slowly and strongly, it works like a small pump. Each movement pushes a burst of air through the grill, and those bursts can break the surface tension and throw the droplets out. You can actually see this happen: play the right tone, and tiny drops jump off the speaker grill.&lt;/p&gt;

&lt;p&gt;This is not a new idea. The Apple Watch has used sound to eject water from its speaker for years. Phones simply do not ship with the same feature built in, so web tools recreate it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why 165Hz and Not Just Any Sound?
&lt;/h2&gt;

&lt;p&gt;Not every tone works well. The frequency matters a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Very high tones&lt;/strong&gt; move the cone only a tiny distance, so they push almost no air&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Very low tones&lt;/strong&gt; are weak on small phone speakers, which cannot reproduce deep bass properly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A low tone around 150–200Hz&lt;/strong&gt; is the sweet spot: the cone moves far enough to pump air, and the small speaker can still play it loudly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;165Hz&lt;/strong&gt; sits right in that sweet spot. It is low enough to move a lot of air, safe for the speaker at normal listening levels, and strong enough to push water droplets out of the grill in under a minute. Many cleaning tools also sweep slowly up and down in this range, because a moving frequency can shake loose droplets that a single fixed tone misses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build It in the Browser: The Web Audio API
&lt;/h2&gt;

&lt;p&gt;Here is the pleasant surprise for developers: you do not need an app for this. The &lt;strong&gt;Web Audio API&lt;/strong&gt;, built into every modern browser, can generate a clean tone in a few lines of code:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;AudioContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;oscillator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createOscillator&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createGain&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;oscillator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sine&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;       &lt;span class="c1"&gt;// a clean, smooth tone&lt;/span&gt;
&lt;span class="nx"&gt;oscillator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;frequency&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;165&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 165Hz — the water-eject sweet spot&lt;/span&gt;

&lt;span class="nx"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;            &lt;span class="c1"&gt;// full volume for maximum air movement&lt;/span&gt;

&lt;span class="nx"&gt;oscillator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;gain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;oscillator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// stop it after 60 seconds&lt;/span&gt;
&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;oscillator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stop&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is honestly most of the technology. A production tool adds polish on top — a frequency sweep, a timer, big touch-friendly controls, and safety warnings — but the core is just an &lt;strong&gt;oscillator, a gain node, and the phone's own speaker&lt;/strong&gt; doing the physical work.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use the Tone Safely
&lt;/h2&gt;

&lt;p&gt;If you try this on your own phone, follow these simple steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Remove the case&lt;/strong&gt; and wipe the phone dry with a soft cloth&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn the volume to maximum&lt;/strong&gt; — air movement is the whole point&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hold the phone with the speaker facing down&lt;/strong&gt;, so gravity helps the water leave&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Play the tone for 45–60 seconds&lt;/strong&gt; and watch for droplets on the grill&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeat two or three times&lt;/strong&gt; if the sound is still muffled, then let the phone air-dry&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A few honest warnings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Never do this with headphones connected&lt;/strong&gt; — the tone should play from the phone speaker only&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not use rice as your main plan&lt;/strong&gt;; it does little for water already inside the grill and can leave dust behind&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not charge a wet phone&lt;/strong&gt; until the port is fully dry&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Sound Cannot Fix
&lt;/h2&gt;

&lt;p&gt;Sound only removes &lt;strong&gt;water and loose dust&lt;/strong&gt; from the grill area. It cannot repair a torn speaker cone, a burnt voice coil, or corrosion that has already damaged the hardware. If your speaker crackles when the phone is fully dry, distorts at low volume, or produces no sound at all after a drop, that is a repair-shop problem, not a sound problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;If your phone speaker sounds muffled right now, you can test the idea in your browser with no install: &lt;a href="https://ifixmyspeaker.com" rel="noopener noreferrer"&gt;Fix My Speaker&lt;/a&gt; plays the 165Hz tone (with a sweep mode) for free and works on both Android and iPhone.&lt;/p&gt;

&lt;p&gt;And if you are a developer, the fun part is how small the core really is. A serious, genuinely useful tool can start from &lt;strong&gt;one oscillator node&lt;/strong&gt; — the physics does the heavy lifting.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>audio</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
