When a word definition is shown clicking the speaker icon will speak its pronunciation:

How to make it automatic on page load?

  • If you are using Firefox I can write you a script to do this. – SleepingGod May 14 '17 at 14:13
  • Thanks for that. I have already made a script below. Can you check if there's a better way to do this? In my use, the pronunciations are only spoken after the page loading is finished, which is a little slow in my laptop. If there is a way to pronounce it right when the sound is downloaded, then I don't have to wait for the sound before closing the tab. – Ooker May 15 '17 at 10:02
  • That's what i've been trying to do but my script is failing when it comes in contact with Google instant, something about the way Google displays results – SleepingGod May 15 '17 at 12:03
  • The definition can be shown when you are still typing the word? – Ooker May 15 '17 at 12:29

Right click on the icon, choose Inspect Element. On the correct element, right click and choose Copy > CSS Selector. Then create a userscript with this line

document.querySelector("INSERT SELECTOR").click();

Userscript on Greasyfork

// ==UserScript==
// @name        Google auto-speak pronunciation 
// @namespace   https://greasyfork.org/en/scripts/29771-google-pronunciation-speak
// @include     https://*google.com*
// @version     1
// @grant       none
// @description Auto speak pronunciation when googling word's definitions 
// @author      Ooker
// ==/UserScript==

document.querySelector(".lr_dct_spkr > input:nth-child(1)").click();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.