⚡️ Introducing Rapid Voice Cloning

Q

How to Create Alexa Skills with Custom Voices (Step-by-Step)

Apr 19, 2021

Smart speakers have been one of the most gifted items over the holidays and, therefore, it is no surprise that almost every home has at least one of these devices. To make the most of them, devices like the Echo Show and the Echo Dot make apps available for users called Alexa Skills.

These voice enabled apps allow a user to check the news, play games, and even listen to recipes from celebrity chefs. Making these apps is as easy as ever when you follow our simple guide below. We’ve even created custom code you can copy and paste to make it easier to build custom voice experiences using the voices in Resemble AI.

With Resemble AI, you can clone your own voice or use our professional voice talent’s synthetic voices to supercharge natural sounding conversations on Alexa devices.

This guide will allow you to get setup with your very own Alexa Skill with custom voices and an optional AI Text generation and TTS integration powered by OpenAI’s GPT-3 and Resemble AI.

 

The Basics

 

To get started, first create an Amazon developer account here: https://developer.amazon.com/dashboard

Amazon Developer Account Sign Up Page
Once you fill out the form with your basic information you can proceed to the next step where you’ll find the Dashboard. Here, you can select “Amazon Skills Kit” from under the Amazon Alexa column.
Create Alexa Skill
This will bring you to a screen where you can select “Create Skill” to make your first Amazon Alexa Skill.
Create Alexa Skill
Give your skill a name and choose the language you want it to be available in (Don’t worry too much about this as you can change this later).

You can also choose your hosting region in the top right if there’s a particular one you want. If not, the default host location “US East N. Virginia” will work just fine.

Give Alexa Skill a Name
Next, you can choose a model for your skill. In this example, we’ll choose “Custom”, but you can choose the one that matches your skill type best.
Choose a Model
For the next step, in order to use the custom built code hosted on our GitHub, choose Python as your backend hosted by Alexa and AWS. This will enable you to use their free tier as well to test out the skill before ramping up your use.
Alexa Skill Hosting
Finally, choose your template and click continue. You can even import skills from a public Git repository. For this demo “Start from Scratch” works just fine.

Clicking “Continue with template” will then create the skill and bring you to the Alexa Developer Console.

Choose a Template for the Alexa Skill
The Alexa Skill is now created
Adding Custom Code to your Alexa Skill

To add the custom code to your Alexa Skill, simply use the code here:

https://github.com/resemble-ai/resemble-alexa/blob/master/lambda_function.py

Copy the code on this GitHub Project, and then head back to the Alexa Developer Console. In the console go to the “Code” tab in the top menu bar. In this window replace all the code present with the copied code from the GitHub Project linked above.

Adding Custom Code to the Alexa Skill
There are now a few things you need to add to this code in order to make it work. For this you will need:

  1. RESEMBLE_API_KEY (API Token)
  2. VOICE_UUID (Voice ID)
  3. PROJECT_UUID (Project ID)
  4. INTRO_AUDIO = “” (Optional Prompt Audio when Skill is opened)
  5. ASK_AUDIO = “” (Optional Audio to invoke a response from User)
  6. OPEN_AI (Optional OpenAI Token to use GPT-3)

To get the first three ID’s follow the next step.

Adding Custom Voices with Resemble AI

To add custom voices, create an account on Resemble AI. This will give you access to the API where you can easily connect the voices on Resemble to your newly created Alexa Skill.

Create your account here: https://app.resemble.ai/users/sign_up

If you already have an account, head over to Resemble’s API: https://docs.app.resemble.ai/. 

Custom Voices API Token

Once you create the account, click on the top right dropdown menu and select “API” to get the API Token. You can also find the token once signed in here: https://docs.app.resemble.ai/. 

Custom Voices API Sign In
Custom Voices API Sign In Token

Similarly, you can access the Project and Voice IDs in our documentation site: https://docs.app.resemble.ai/

Click on “Execute” to get the projects and voices on your account. If you need other professional synthetic voices, browse the Resemble Voice Marketplace and add the one you like to your account. The ID associated with that voice will then be available to you.

Custom Voices Project ID Key
Custom Voices Voice ID Key
Final Steps to Create the Amazon Alexa Skill

With the copied Custom API Token, Project, and Voice ID’s, replace those values with the ones in the Python Code within the Alexa Development Console.

If you’re using GPT-3, make sure to add your OpenAI account details to the “requirements.txt” from the GitHub Project

Finally, test your code, and distribute it to the Alexa Skill Store!

Alexa Skill Test
Just to show what’s possible with this implementation, check out this GPT-3 powered Albert Einstein Skill we created with his own voice, generated with Resemble.

More From This Category