Speech Recognition

@GoToLoop Auto-corrector changed what I meant to say, not variable but available, so my mistake. I amended my post.

I did some more testing and doing myRec = new p5.SpeechRec('en-US'); doesn’t seem to work in the global context. I do not have a certain answer as I am experiencing errors with the library from time to time. I am guessing it is because the library object is not properly disposed. From my limited experience with p5, should speechRec() be called in setup, right? Is this a requirement for “SpeechRec is a nested static class of class p5”? When is setup called during initialization? I assume the p5 constructor is called when the p5.js library is loaded but setup must be called in window.onload() or similar method?

Kf