Dan Holevoet
Dan Holevoet

Reputation: 9183

I have an Alexa skill. How do I make it work with Google Home?

I’ve already built an Alexa skill, and now I want to make that available on Google Home. Do I have to start from scratch or can I reuse its code for Actions on Google?

Upvotes: 6

Views: 4413

Answers (3)

Jan König
Jan König

Reputation: 440

Google Assistant works similar to Amazon Alexa, although there are a few differences.

For example, you don't create your language model inside the "Actions on Google" console. Most Google Action developers use DialogFlow (formerly API.AI), which is owned by Google and offers a deep integration. DialogFlow offered an import feature for Alexa Interaction models, which doesn't work anymore. Instead, you can take a look at this tutorial: Turn an Alexa Interaction Model into a Dialogflow Agent.

Although most of the work for developing voice apps is parsing JSON requests and returning JSON responses, the Actions on Google SDK works different compared to the Alexa SDK for Node.js.

To help people build cross-platform voice apps with only one code base, we developed Jovo, an open-source framework that is a little close to the Alexa SDK compare to Google Assistant. So if you consider porting your code over, take a look, I'm happy to help! You can find the repository here: https://github.com/jovotech/jovo-framework-nodejs

Upvotes: 6

Antonio Cucciniello
Antonio Cucciniello

Reputation: 653

This can be done but it will require some work and you will not have to rewrite all of your code.

Check out this video on developing a Google Home Action using API.AI (that is recommended).

Once you have done the basics and started understanding how Google Home Actions differ from Amazon Alexa Skills, you can simply transfer your logic over to be similar. The idea of intents are very similar but they have different intricacies that you must learn.

When you execute an intent it seems as if your app logic will be similar in most cases. It is just the setup, deploying and running that are different.

Upvotes: 0

Dan Holevoet
Dan Holevoet

Reputation: 9183

It is possible to manually convert your Alexa skill to work as an Assistant Action. Both a skill and an action have similar life cycles that involve accepting incoming HTTP requests and then responding with JSON payloads. The skill’s utterances and intents can be converted to an Action Package if you use the Actions SDK or can be configured in the API.ai web GUI. The skill’s handler function can be modified to use the Actions incoming JSON request format and create the expected Actions JSON response format. You should be able to reuse most of your skill’s logic.

Upvotes: 3

Related Questions