Answer the question
In order to leave comments, you need to log in
How to stop SpeechSynthesisUtterance text from being spoken when navigating to another page?
How can I make sure that after voicing by the method SpeechSynthesisUtterance
, when moving to another page in the same window, the voicing of the text stops?
<button class="let-speak" onclick="speek();">Произнести вслух</button>
<input id="text" value="">
<script>
function speek() {
window.speechSynthesis.speak(new SpeechSynthesisUtterance(document.getElementById("text").value))
}
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question