The source for pagenodes is here: 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_...