Share your repls and programming experiences

← Back to all posts
Create a powerful voice assistant in just a few lines of code
h
MarcusWeinberger

Meet annyang - a tiny JavaScript Speech Recognition library

In under 30 lines of JavaScript, I added 2 simple commands, and 2 complex ones.

  • hello - this is a testing function, it creates an alert box
  • go to blog - this just redirects you to my blog
  • ask (me) my *thing - this is the first complex one.
    • You can say ask me my name
    • ask my age
    • ask my my favourite colour in the whole wide world
  • search (for) *query - search google for whatever you want

As you can see, from this very simple demo, the potential is limitless. More info can be found here

Voters
SaicharanMugunt
HarperframeInc
MarcusWeinberger
Comments
hotnewtop
arjun418

How do we talk?

MarcusWeinberger

@arjun418 you should get a browser permission request for voice access, then just say a command