Created
August 11, 2022 09:41
-
-
Save reneroboter/42478a6dfe28af379eea83a80d953192 to your computer and use it in GitHub Desktop.
A little poc for creating an pronunciation trainer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
words
at line 6 with the vocabulary you want to learn.Inspect
tool.Sources
.New snippet
.run
.