robphy-p5speech
I stumbled upon the
which seems to work with many browsers, including on my iPhone.
Check out:
robphy-Glowscript-WebSpeechAPI
I only got the speech synthesis to work alongside Glowscript code.
I didn't get speech recognition to work alongside Glowscript yet.
The behavior of the program differs among browsers and systems.
On Win10, Microsoft Edge and Firefox seem to work better than Chrome.
All will respond to the clicking of objects in the scene.
But some synthesized speech seems lost on start up.
It will cycle through the available voices available to your browser.
On one of my laptops, Firefox had two voices, Chrome had 30, Edge had 80.
On another (newer) laptop, Firefox had 2, Chrome had 22, and Edge had 71.
On my iPhone, Safari has 39 voices.
Each voice can be tuned to have different speeds, pitches, and volumes.
Right now, it seems to lack control for waiting for speech to finish.
I probably have to make use of 4.2.1 attributes: pending, speaking, or paused,
and maybe the EventHandler onend.
This might be helpful:
I may have to learn about "Promises", and the async and await keywords
described above and in the Glowscript documentation
rob salgado
(robphy)