Skip to content

Instantly share code, notes, and snippets.

@aereal
Created February 21, 2022 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aereal/7c9168a26ae00d43b28748ac2684db04 to your computer and use it in GitHub Desktop.
Save aereal/7c9168a26ae00d43b28748ac2684db04 to your computer and use it in GitHub Desktop.
(() => {
const content = document
.querySelector(".main-content-inner")
.textContent.replace(/\s+/g, " ");
// init
speechSynthesis.speak(new SpeechSynthesisUtterance(""));
const utter = new SpeechSynthesisUtterance(content);
utter.lang = "ja-JP";
speechSynthesis.speak(utter);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment