<?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 Cleaner</title>
    <description>The latest articles on DEV Community by Fix My Speaker Cleaner (@fixmyspeakercleaner).</description>
    <link>https://dev.to/fixmyspeakercleaner</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%2F4221732%2Fc97eb314-1760-4907-bf0d-3355060acaca.png</url>
      <title>DEV Community: Fix My Speaker Cleaner</title>
      <link>https://dev.to/fixmyspeakercleaner</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fixmyspeakercleaner"/>
    <language>en</language>
    <item>
      <title>Fix My Speaker Cleaner: Remove Water and Dust from Speakers</title>
      <dc:creator>Fix My Speaker Cleaner</dc:creator>
      <pubDate>Mon, 02 Nov 2026 07:16:13 +0000</pubDate>
      <link>https://dev.to/fixmyspeakercleaner/fix-my-speaker-cleaner-remove-water-and-dust-from-speakers-2dk6</link>
      <guid>https://dev.to/fixmyspeakercleaner/fix-my-speaker-cleaner-remove-water-and-dust-from-speakers-2dk6</guid>
      <description>&lt;p&gt;Has your phone speaker started to sound dull, quiet, or crackly? Water, dust, sweat, and pocket lint get into the tiny speaker grille every day, and even a few droplets can muffle the sound.&lt;/p&gt;

&lt;p&gt;You may have seen "speaker cleaner" websites that play odd low tones. This post explains why that idea works, where it stops working, and how to build a basic version yourself with the Web Audio API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why phone speakers sound muffled
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trapped water.&lt;/strong&gt; Rain, spills, or a dip in a pool can leave droplets in the grille. They stop the diaphragm from moving freely, so sound becomes muffled or crackly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dust and lint.&lt;/strong&gt; Pockets and bags push fine fibers into the opening, which slowly lowers volume and clarity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grime.&lt;/strong&gt; Skin oil and sweat build a sticky layer that is harder to shift than loose dust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Liquid residue.&lt;/strong&gt; Sugary or salty liquids can leave residue behind after they dry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hardware damage.&lt;/strong&gt; Drops, corrosion, or long-term water damage can harm the speaker itself. No software can fix that.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How sound can help
&lt;/h2&gt;

&lt;p&gt;A speaker moves a thin diaphragm back and forth to push air. A low-frequency tone at moderate volume makes that diaphragm move in larger, slower strokes, and the vibration can nudge small droplets and loose particles toward the opening.&lt;/p&gt;

&lt;p&gt;Some smartwatches ship a built-in "water eject" feature based on this same idea. Browser tools do the same thing with a generated tone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Limits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It mainly helps with droplets &lt;em&gt;near&lt;/em&gt; the grille, not moisture deeper inside the phone.&lt;/li&gt;
&lt;li&gt;It does little for packed dust or oily buildup.&lt;/li&gt;
&lt;li&gt;Results vary by device and speaker design.&lt;/li&gt;
&lt;li&gt;It can't repair corrosion, electrical faults, or a damaged diaphragm.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build a simple tone player
&lt;/h2&gt;

&lt;p&gt;The Web Audio API can generate the tone with no audio file at all:&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;let&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;playTone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;frequency&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="nx"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Must be called from a user gesture (e.g. a button click),&lt;/span&gt;
  &lt;span class="c1"&gt;// otherwise browsers block audio autoplay.&lt;/span&gt;
  &lt;span class="nx"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="k"&gt;new &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AudioContext&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webkitAudioContext&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;osc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ctx&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;ctx&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;osc&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="nx"&gt;osc&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="nf"&gt;setValueAtTime&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;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTime&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Fade in/out to avoid clicks and sudden loud starts&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;setValueAtTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTime&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;linearRampToValueAtTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTime&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.3&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;linearRampToValueAtTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTime&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;seconds&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;osc&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="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&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;osc&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="nx"&gt;osc&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="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;currentTime&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;seconds&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;playTone&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few implementation notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User gesture required.&lt;/strong&gt; Browsers suspend &lt;code&gt;AudioContext&lt;/code&gt; until the user interacts with the page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the gain low.&lt;/strong&gt; A fixed, modest gain (0.2 here) protects small speakers. Never default to maximum volume.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short cycles.&lt;/strong&gt; Cap each run at a few seconds and let users repeat, rather than looping indefinitely.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output device.&lt;/strong&gt; The tone plays through whatever output is active. If Bluetooth earbuds are connected, the phone's speaker won't be cleaned.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using a tone tool safely
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Remove the phone case so it doesn't cover the grille.&lt;/li&gt;
&lt;li&gt;Disconnect Bluetooth devices.&lt;/li&gt;
&lt;li&gt;Set a moderate media volume.&lt;/li&gt;
&lt;li&gt;Point the affected speaker downward so gravity helps.&lt;/li&gt;
&lt;li&gt;Play one full cycle, then test with a short clip.&lt;/li&gt;
&lt;li&gt;If nothing changes after a couple of tries, stop. Repeating it endlessly won't help and can strain the speaker.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Afterward, leave the phone somewhere dry and ventilated. Don't charge it while the port may be wet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sound vs manual cleaning
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Sound-based&lt;/th&gt;
&lt;th&gt;Manual&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Best for&lt;/td&gt;
&lt;td&gt;Light moisture, loose dust&lt;/td&gt;
&lt;td&gt;Visible lint, sticky residue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Limits&lt;/td&gt;
&lt;td&gt;Can't clear packed dirt or internal water&lt;/td&gt;
&lt;td&gt;Needs care to avoid pushing debris deeper&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A reasonable routine: try a tone first, then use a soft, dry brush with light strokes if you can see debris. If neither helps, suspect hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to avoid
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hair dryers or direct heat&lt;/li&gt;
&lt;li&gt;Needles, pins, or toothpicks in the openings&lt;/li&gt;
&lt;li&gt;Compressed air (it can push debris and moisture deeper)&lt;/li&gt;
&lt;li&gt;Household cleaning liquids&lt;/li&gt;
&lt;li&gt;Long sessions at high volume&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Always check your phone manufacturer's official guidance for liquid exposure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick troubleshooting
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Still muffled:&lt;/strong&gt; run one more short cycle, then let the phone dry for several hours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No sound:&lt;/strong&gt; check volume, silent mode, and that the browser tab isn't muted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audio goes to Bluetooth:&lt;/strong&gt; disconnect the paired device and retry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One speaker is quieter:&lt;/strong&gt; point it downward and run the cycle again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distortion after drying:&lt;/strong&gt; the speaker may be damaged, so contact an authorized repair service.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Tone-based cleaning is a low-effort first step for light moisture and loose dust, and it's a nice small project for learning the Web Audio API. It isn't a repair tool, and drying plus gentle brushing do most of the real work.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm affiliated with &lt;a href="https://fixmyspeakercleaner.com.in/" rel="noopener noreferrer"&gt;FixMySpeakerCleaner&lt;/a&gt;, a browser-based tone player, if you'd rather not build your own.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
