const synth = window.speechSynthesis
let ourText = "Hey there what's up!!!!"
const utterThis = new SpeechSynthesisUtterance(ourText)
synth.speak(utterThis)
if i run this js file using Node command this error is comming
ReferenceError: window is not defined
My main motto is to convert that Text into Audio file and saved in my local folder and this Speak method should run on onClick event of a button