by verst · 10y ago · 0 comments
I was able to use them on PageNodes via the "espeak" output just fine, but would like to use them directly in my own apps.
Also MDN has some pretty good documentation on the WebSpeech API https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_...
In Chrome the following works as a basic sample:
speech = new SpeechSynthesisUtterance(String("生日快乐"))
voice = speechSynthesis.getVoices()[80] // use Google Chinese Voice
speech.voice = voice
speechSynthesis.speak(speech)