Skip to content

Instantly share code, notes, and snippets.

@reneroboter
Created August 11, 2022 09:41
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 reneroboter/42478a6dfe28af379eea83a80d953192 to your computer and use it in GitHub Desktop.
Save reneroboter/42478a6dfe28af379eea83a80d953192 to your computer and use it in GitHub Desktop.
A little poc for creating an pronunciation trainer
let counter = 0;
let pronunciationTrainer = setInterval(() => {
if(counter > 10) {
clearInterval(pronunciationTrainer);
}
let words = ['whom', 'authenticity', 'thus'];
let selectWord = Math.floor(Math.random() * words.length)
let utterance = new SpeechSynthesisUtterance(words[selectWord]);
utterance.lang = 'en';
speechSynthesis.speak(utterance);
counter++;
}, 5000)
@reneroboter
Copy link
Author

  1. Adjust the words list in words at line 6 with the vocabulary you want to learn.
  2. Start Chrome and start the Inspect tool.
  3. Go to Sources.
  4. Add a new file with New snippet.
  5. Copy&Paste the code from above.
  6. Make a right click on the file and select run.
  7. Have fun 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment