quiz sentence hide details and stop audio before starting next
This commit is contained in:
1 parent
eff1227b20
commit
09af058fa1
3 files changed
+26
-1
No files matched your search
@@ -30,6 +30,10 @@ async function playAudio() {
|
||||
const voices = await getVoices(lang);
|
||||
if (!voices.length) return;
|
||||
|
||||
document.querySelectorAll("audio").forEach((el) => {
|
||||
el.pause();
|
||||
});
|
||||
|
||||
const v = voices[Math.floor(Math.random() * voices.length)];
|
||||
console.log(JSON.stringify(v));
|
||||
await speak({
|
||||
|
||||
Reference in new issue
Block a user