Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created March 31, 2019 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/1b992c5d66333329b9cb2e550661c0b5 to your computer and use it in GitHub Desktop.
Save NMZivkovic/1b992c5d66333329b9cb2e550661c0b5 to your computer and use it in GitHub Desktop.
async function run() {
recognizer = speechCommands.create('BROWSER_FFT', 'directional4w');
await recognizer.ensureModelLoaded();
var canvas = document.getElementById("canvas");
var contex = canvas.getContext("2d");
contex.lineWidth = 10;
contex.lineJoin = 'round';
var positionx = 400;
var positiony = 500;
predict(contex, positionx, positiony);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment