Desktop Voice Assistant
Voice controlled assistant for desktop environment.
Easily extensible by installing external procedures like any node package.
Install
npm i desktop-voice-assistant
Example usage
const Assistant = ; const open = ;//only for matter of this example //Example procedure which opens google.com page with search resultsProcedureBase //it's not necessary but recommended to extend your class /** @param */ { superresults; //PREPARE SOMETHING HERE OR HANDLE IT AND FINISH OR PASS TO UPDATE console; this; } /** @param */ { //you can wait for final recognition results to check alternative results if results return; results; for let result of results //from most confident let match = result; if match //found most confident final result Assistant; break; thisfinished = true; // IF YOU WANT TO SHOW NOTIFICATION OR PRINT ANSWER IN LISTENER WINDOW - YOU CAN DO IT LIKE THAT /******************************* this.notification = { content: equation }; this.answer = { message: equation, loud: true }; *******************************/ // FOR MULTILINGUAL SUPPORT YOU CAN CHECK CHOSEN LANGUAGE WITH THIS FUNCTION //Assistant.getLang(); } /** @param*/ { //press ctrl + f remotely AssistantRobot; ; } /** @param*/ { ; }//you say anything that matches regexp of chosen language to trigger this procedureMyProcedureSearchregexp = 'en-US': /^search .+/i;/***********************************************************************************/ //procedures can be installed like any node packageAssistant;
Usage information
- Browser notifications works only in secure web context so if you are not mean to use this package locally - make sure to connect through https.
- Function "classifyDesktopContent" takes desktop screenshot and uses tensorflow.js to classify it's content into several categories like Website, Game, App. You can use it to differently interpret commands as shown in example above.
NOTE: convolutional neural network is not trained well yet. I am still extending dataset of screenshots for further training. Any help will be appreciated ;)