Marvin is a personal assistant responding to voice input. By default it uses Webkit Speech API and WitAI to record and parse voice inputs.
This project is written with javascript and runs on electron.
Tested under:
- Yosemite
Engine Name: WebkitWitAI
Status: Stable
This engine uses webkit speech engine for speech to text capabilities. It then sends the text to WitAI for intent recognition.
Engine Name: SoxWitAI
Status: Under development
This engine uses Sox cli to record voice input and sends it to Wit.ai for speech to text and intent recognition.
Path: greeter.js
Sample command: Hello Marvin!
This plugin will say hello back to you.
Path: listening_state.js
Sample command: Start Listening
Will active/deactive the app.
Path: volume.js
Sample command: Turn volume up by 5 bars
Use this to increase/decrease you computers volume.
Path: marvin-notifier
This plugin react to every intent and pop-ups a notification baloon to give feedback on the intent.
The plugins are put to the applications default user folder.
Mac OS X:
/Users/username/Library/Application Support/Marvin/plugins
On application launch it will load each script found under this folder and load them. Any change in this folder requires an app restart.
These plugins could be stateful, in example the user may want the system to shutdown and the plugin may require verification like yes/no before acting on the request.
Below is the api that should be implemented.
This will be the name of the plugin. This will be used on the settings screen and logs.
This function will be called only once the plugin is loaded.
This function will be called everytime the intent recognition is finished. It should return a boolean value stating whether the act function should be called or not.
const notifier = require('node-notifier');
module.exports = {
name: "greeter",
init: function(ipc, settings) {
this.ipc = ipc;
this.settings = settings;
},
willReact: function (intent, text, args) {
return intent === "greetings";
},
act: function (intent, text, args) {
ipc.emit('say', 'hello ' + this.settings.get('user').name);
}
}
This project is forked from electron-react-boilerplate, although many dependencies have been added/removed from it.
npm run dev
npm run lint
npm run test
npm run package
- The system uses html5 navigator.onLine property to detect whether the computer is connected to the internet. This may sometimes give a false positive as the router may require a login information. Please be sure that you are connected before filing any bug reports.