How to disable WhatsApp Web's voice message chimes
It's pretty annoying to be playing a voice message just for the chime to play at max volume... because the voice message's volume was low.
The voice message chime is annoying. Imagine listening to a voice note and you’re doing something else, just for a loud ass sound to go down in your eardrums as it goes to play the next one.
Just to be clear, this can work on any site, and this can block any audio file. But just for the sake of this blog—we’ll be focusing on how to disable the sounds played when listening to a voice note on WhatsApp Web.
So, how exactly do we disable that? I’ve made a little userscript that you can use to disable the chimes. Though before that—you’ll need to fetch the audio file’s name. It’s easy though.
How would you use the userscript? By using a userscript manager of choice, that can be something like Tampermonkey or Violentmonkey .
Once you have your userscript manager of choice installed however, you can import the script you’ll see in the large codeblock below.
Now on to getting the audio file name…
- Open your DevTools Console1 and paste this to intercept all audio play calls:
HTMLMediaElement.prototype.play = function() {
console.log('Audio played:', this.src);
};Trigger the sound you’ll want to identify, in this case—the annoying voice message chime sound. Play a voice note and wait for the chime sound to play, then check the console for the logged
srcURL.Once you’ve gotten the filename(s) of the sound you’ll want to block, again in this case—the chimes, copy the script below and paste it into your userscript manager. Then edit it by replacing the values that’s around both
src.includes(first for the “continuing” chime and the other is for the “finished” chime) with the filenames of the.mp3you’ve fetched via the DevTools Console.
// ==UserScript==
// @name Disable WhatsApp Web voice message chimes
// @match https://web.whatsapp.com/*
// @run-at document-start
// @version 1.0
// @author pparaxan
// @icon https://raw.githubusercontent.com/pparaxan/.profile/refs/heads/master/xan!Brand_GradientOverlay.png
// ==/UserScript==
HTMLMediaElement.prototype.play = (function(orig) {
return function() {
const src = this.src || '';
if (src.includes('ze2kHBO') || src.includes('WElxnwAGYY2')) {
return Promise.resolve();
}
return orig.apply(this, arguments);
};
})(HTMLMediaElement.prototype.play);- Save and close the script and refresh WhatsApp Web!
Now when playing your voice note, it shouldn’t make those annoying chimes ever again.
Why does this work however?
This script hooks into HTMLMediaElement.prototype.play, which is the API used to start playback of media elements
such as audio & video. Whenever something calls play(), this script would check the media element’s src:
const src = this.src || '';And if the URL contains one of the identifiers we want to block, the script immediately returns a resolved Promise instead of allowing the audio to play:
return Promise.resolve();And everything else is passed through to the original play() implementation:
return orig.apply(this, arguments);The worse thing is that I doubt that Meta would actually impl. a feature to disable the chimes, so this method might as well be the only way on disabling them—which is dumb.
Ctrl + Shift + I≈⌥ + ⌘ + I↩︎
