How to Disable Text-to Speech feature using JavaScript

I have created an Samsung SmartTv app now want to disable the TTS feature from my app and i have tried multipple methods but none of them worked as i used
function speak(){

var msg = new SpeechSynthesisUtterance(’’);
window.speechSynthesis.speak(msg);
}
this function onload and calling it on every one second but it is not working as aspected