4 ms·
Does anyone know how the Google TTS voices in the example are exposed by Google? Is there an API / service for these? I haven't been able to find it. I was abl
by verst 11y ago
Does anyone know how the Google TTS voices in the example are exposed by Google? Is there an API / service for these? I haven't been able to find it.
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.
- warbrett 11y agoThis might help you: https://github.com/monteslu/pagenodes/blob/7388ce58726836cf663499a4dd2f39ca2272c5fa/src/editor/nodeDefs/core/espeak.js#L8 https://github.com/monteslu/pagenodes/blob/7388ce58726836cf6...
- verst 11y agoSuper helpful. Thanks! 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)
- monteslu 11y agoThe source for pagenodes is here: https://github.com/monteslu/pagenodes https://github.com/monteslu/pagenodes and you can look at src/editor/nodeDefs/core/espeak.js as an example. Also MDN has some pretty good documentation on the WebSpeech API https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_...
- deleted 11y ago[deleted]