Building Cross-Platform Voice Apps With VOXA — Part 1

Getting started with a math quiz app

Octavio Menocal
Sep 3, 2019 · 4 min read
Image for post
Image for post
Image via and adapted with tech reference

This is the first part of a series of five pieces, covering why it would be a good idea to use a cross-platform framework for your next voice app. I’ll also explain how to create a quick cross-platform game for Alexa and Google Assistant, taking advantage of the VOXA’s APIs.

It’s already been four years since the first development kit was released for one of the first voice platforms, Amazon Alexa. The platform has evolved hugely since then, and other competitors have joined the market — Google Assistant, Cortana, Siri, Samsung Bixby, and others.

The companies that created these platforms also built frameworks for developers to create applications for their platforms. Here’s dilemma number one for developers: if I want to create my skill in more than one platform: should I write my code in two or three different frameworks?

Let me tell you what I answered to myself: Octavio, please no! Don’t do that! Instead, use a framework that covers some or all of them.

That’s what I have done to develop skills for Alexa and actions for Google. I selected VOXA, a Node.js based framework that takes advantage of the state machine and MVC principles to develop voice applications for Alexa and Google Assistant. As a plus, it also has support for creating apps for Telegram and Facebook Messenger.

If you are a developer starting to dig into Alexa and Google Assistant voice apps, or a user experience designer with no development skills, or an experienced developer who has created skills/actions with other frameworks like the Alexa SDK or the Google Assistant SDK, you’ll find in VOXA an extraordinary tool to work collaboratively with your team.

Hence, I want to show you how you can easily build skills for Alexa and Google Assistant using VOXA. The framework also has a good command-line interface: VOXA-CLI, with a suite of useful tools to create a VOXA project, download utterances and responses, and many other things. If you’re working on a team with other developers and/or Voice User Interface (VUI) designers, and even with a Project Manager, all of them can collaborate for the VUI part of the application.

This is extremely useful when, for example, a VUI designer wants to add, modify, or delete utterances for your app’s intents, or want to modify a response. There could be many ways to get these changes from the VUI designer.

For example:

  • Having a single file in your project, have the VUI designer make the changes to the file and get it back to put it up in the project.
  • Uploading the code to a Git repository and have the VUI designer submit a Pull Request with the changes to the file.

As those two approaches are optional, the VUI designer may not know Git. Or they can make a mistake in the file. With VOXA, you create a spreadsheet, and have your VUI designer, Marketer, Project Manager or whoever is in charge of the VUI part, modify the spreadsheet and with a single command in your terminal, you can download their changes to create the responses file of the app, the interaction model for Alexa and the Dialogflow Agent for Google Assistant.

Here’s the use case. The game is called, Quick Maths: the user needs to do a math calculation as fast as possible — if they answer correctly they will get points as follows:

The user responds correctly in 1- 2 seconds: 10 points

The user responds correctly in 3 - 4 seconds: 8 points

The user responds correctly in 5 - 6 seconds: 4 points

The user responds correctly in more than 6 seconds: 1 point

The interesting part: if the user responds incorrectly, 2 points are deducted from their score. If they have 0 points, there’s no deduction.

It’s simple, right? Well, we’re going to make it a little more complex. We’re going to get the user’s profile information with VOXA:

  • Get User Profile: we’ll need the user’s name to greet the user with their name and when they answer correctly. And we’ll need the user’s email to persist the information in our database. We’ll set up Alexa’s Account Linking and Google’s Sign-in to get this info.

Here’s the fun part: we’re going to add a competition feature to our game. The user with the highest score will be the winner of the monthly competition. We will show a leaderboard with the top 10 players. As you may guessing, we’ll add a subscription for this. The user will be charged $0.99 per month to continue participating in the competition.

Does this sound like monetization? Yes it does!

We’ll use Alexa’s ISP and Google Assistant’s Digital Goods for this feature. To make it more interesting, we’ll ask the user their permission to get their location so we can show where they’re from in the leaderboard.

The next four piece in this series will cover our journey on how to set up the project with VOXA. Here are the details:

Part 2: Set up VOXA, Alexa’s Account Linking, and Google’s Sign-In, intents and utterances.

Part 3: Develop the game’s logic, get user’s profile and store the user’s score in AWS DynamoDB.

Part 4: Add Alexa’s ISP and Google Assistant’s Digital goods for the competition subscription and user’s location permission.

Part 5: Add game’s leaderboard and Unit Testing.

Final Words

This was the first piece in a series of articles where I will show you how easy is to create a voice application with VOXA, and how we can leverage its APIs to create more complex scenarios.

Thanks for reading! Be sure to check out the rest of the series.

Don’t throw garbage in the ocean!

Advice for programmers.

By Better Programming

A weekly newsletter sent every Friday with the best articles we published that week. Code tutorials, advice, career opportunities, and more! Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Thanks to Jose Luis Matus

Octavio Menocal

Written by

Software engineer at Nicaraguan developing Amazon Alexa Skills and actions for Google Assistant. Pingpong lover, big fan of Ma Long!

Better Programming

Advice for programmers.

Octavio Menocal

Written by

Software engineer at Nicaraguan developing Amazon Alexa Skills and actions for Google Assistant. Pingpong lover, big fan of Ma Long!

Better Programming

Advice for programmers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store