Voxa Platforms

Voxa Platforms wrap your VoxaApp and allows you to define handlers for the different supported voice platforms.

class VoxaPlatform(voxaApp, config)
  • voxaApp (VoxaApp) – The app
  • config – The config
Returns:A promise that resolves to a running http.Server on the specified port number, if no port number is specified it will try to get a port number from the PORT environment variable or default to port 3000

This method can then be used in combination with a proxy server like ngrok or Bespoken tools proxy to enable local development of your voice application

Returns:A lambda handler that will call the app.execute method
exports.handler = alexaSkill.lambda();
Returns:A lambda handler to use as an AWS API Gateway ProxyEvent handler that will call the app.execute method
exports.handler = dialogflowAction.lambdaHTTP();
Returns:An azure function handler
module.exports = cortanaSkill.azureFunction();


The Alexa Platform allows you to use Voxa with Alexa

const { AlexaPlatform } = require('voxa');
const { voxaApp } = require('./app');

const alexaSkill = new AlexaPlatform(voxaApp);
exports.handler = alexaSkill.lambda();


The GoogleAssistant and Facebook Platforms allow you to use Voxa with these 2 type of bots

const { GoogleAssistantPlatform, FacebookPlatform } = require('voxa');
const { voxaApp } = require('./app');

const googleAction = new GoogleAssistantPlatform(voxaApp);
exports.handler = googleAction.lambdaHTTP();

const facebookBot = new FacebookPlatform(voxaApp);
exports.handler = facebookBot.lambdaHTTP();


The BotFramework Platform allows you to use Voxa with Microsoft Botframework

const { BotFrameworkPlatform } = require('voxa');
const { AzureBotStorage, AzureTableClient } = require('botbuilder-azure');
const { voxaApp } = require('./app');
const config = require('./config');

const tableName = config.tableName;
const storageKey = config.storageKey; // Obtain from Azure Portal
const storageName = config.storageName;
const azureTableClient = new AzureTableClient(tableName, storageName, storageKey);
const tableStorage = new AzureBotStorage({ gzipData: false }, azureTableClient);

const botframeworkSkill = new BotFrameworkPlatform(voxaApp, {
  storage: tableStorage,
  recognizerURI: process.env.LuisRecognizerURI,
  applicationId: process.env.MicrosoftAppId,
  applicationPassword: process.env.MicrosoftAppPassword,
  defaultLocale: 'en',

module.exports = botframeworkSkill.azureFunction();