Voxa is a framework that uses state machines to create elegant cross platform conversational experiences.
A fsm (state machine) framework for Alexa skills, Google actions, Facebook Messenger and Telegram bots using Node.js
Voxa is a Node.js MVC framework that provides a way to organize a voice application into a state machine. Even the most complex voice user interface (VUI) can be represented through the state machine and it provides the flexibility needed to both be rigid when needed in specific states and flexible to jump around when allowing that also makes sense.
Voxa provides a more robust framework for building Alexa skills, Google Actions, and Facebook Messenger and Telegram Bots. It provides a design pattern that is not found in other frameworks. Critical to Voxa is to provide a pluggable interface and support to all of the latest features from the official frameworks of each voice platform, like ASK and actions-on-google.
Install from npm
npm install --save voxa
const {
AlexaPlatform,
GoogleAssistantPlatform,
FacebookPlatform,
VoxaApp,
} = require('voxa');
// Controllers use views to send responses to the user
const views = {
en: {
translation: {
LaunchIntent: {
tell: 'Hello World!',
},
},
},
};
const facebookAppParams = {
pageAccessToken: 'pageAccessToken',
};
// initialize the voice apps
const voxaApp = new VoxaApp({ views });
const alexa = new AlexaPlatform(voxaApp);
const google = new GoogleAssistantPlatform(voxaApp);
const facebook = new FacebookPlatform(voxaApp, facebookAppParams);
// respond to a LaunchIntent
voxaApp.onIntent('LaunchIntent', (event) => {
return { reply: 'LaunchIntent' };
});
// lambda handlers
exports.alexaHandler = alexa.lambda();
exports.googleHandler = google.lambda();
exports.facebookHandler = facebook.lambda();
An extensive test suite with more than 90% code coverage
npm run test
npm run lint