Add Voice Control In Website With JavaScript – Voix.js

voix.js JavaScript library

On any websites, Mouse is the primary method of input on desktop and touch on mobile devices. Few websites also implement keyboard shortcuts for few operations. But what if you want to add voice control to perform actions and navigate to other part of the website. Yes, you can do with the help of Javascript.

Also read: Adding Keyboard Shortcuts To Your Website With Mousetrap

Voix.js is a nice JavaScript library which lets you add voice control on your website. Use is almost similar like we do for other Js based libraries.

Just include the JS in your HTML file.

<script src="voix.js"></script>

Then create a new instance:

var voix = new Voix('en-US');

To set a voice command for an event, use the below code. In the below example, it will set ‘Play’ voice command for  action.

voix.setCommand('play', playVideo);

Read more about this JS library on its official website.

It is worth to mention that this library works only in Google Chrome. So, take care this and add a note on your website for users if you are planning to use it in your website.

Tags: | |

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.

Similar Articles


Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

2020 UseThisTip | Part of Techlomedia Internet Pvt Ltd Developed By Deepanker