With Alan’s voice assistant SDK for Web, you can create a voice assistant or chatbot and embed it to a web app, website or webpage. The Alan Platform provides you with all the tools and leverages the industry’s best Automatic Speech Recognition (ASR), Spoken Language Understanding (SLU) and Speech Synthesis technologies to quickly build an in-app voice assistant from scratch.
In this tutorial, we will voice enable a simple webpage. You will be able to click the voice assistant button on the page, give custom voice commands and get Alan’s responses.
What you will learn¶
How to create a voice script with simple voice commands
How to test voice scripts in Alan Studio
How to add the Alan button to a website
What you will need¶
This is a getting started tutorial. No prior knowledge is required.
Step 1. Sign up for Alan Studio¶
First, we need to sign up for Alan Studio — the web portal where we will create a dialog scenario, or the voice script, for our voice assistant.
Go to Alan Studio.
Sign up with a Google or GitHub account or with your email address.
In Alan Studio, click Create Voice Assistant. Select to create an empty project and give it any name you want.
Step 2: Add voice commands¶
Now we will add simple voice commands to the voice script.
In the code editor, add the following intents. An intent is a voice command the user can give to receive a voice response or trigger some activity in the client app.
intent(`Hi`, reply(`Hello`)); intent(`Who are you?`, reply(`I'm Alan, your virtual voice assistant`));
Save the changes.
You can test your voice script in the Debugging Chat area in the right part of the screen. Type the voice commands in the text box and press ENTER. You will be able to see Alan’s responses which you have defined. You can also click the Alan button in the bottom right corner and test your commands with voice. Say
"Who are you?", and you will hear Alan’s response.