by Svoka · 1y ago · 0 comments
const voice = speechSynthesis.getVoices().filter(e => e.lang==='zh-HK').at(-1)
const utterance = new SpeechSynthesisUtterance('你好')
utterance.voice = voice
speechSynthesis.speak(utterance)https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_...