Native Messaging => Deno local server => espeak-ng => MediaStreamTrack in browser #17182
guest271314
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Use Native Messaging to start and stop a local Deno HTTPS server, POST
espeak-ngcommand with input text or SSML (Web Speech API does not support processing SSML input towindow.speechSynthesis.speak(), or capturing audio output from thespeak()call), getWAVback in response, turn off local server, create aMediaStreamTrackfromespeak-ngstdout https://github.com/guest271314/native-messaging-espeak-ng/tree/deno-server.We do no install the
denoexecutable. We just fetch the executable withwgetto use JavaScript as our local HTTPS server, which we can make requests to from any Web URL we set. We could alternative fetch the zip file and extract it using Web API's andfetch().The same source code can be used to start and start your own local HTTPS server to pass arbitrary commands to any local applications and shell scripts, and stream the output back to the browser.
Have fun using SSML input to the
espeak-ngspeech synthesis engine and streaming the audio output as aMediaStreamTracklocally or to peers using WebRTC. Cheers!Beta Was this translation helpful? Give feedback.
All reactions