Summer Internship Report
Skill Building with Alexa in AWS
Implemented By: Guided By:
Dhruv Gangwani (16012101009) Prof. Nidhi Thacker
Dharmit Saradva (16012101033)
Raj Master (16012101012)
Department of Computer Science & Engineering
U V Patel College of Engineering
This is to certify that the report entitled ‘Skill Building with Alexa on AWS’ by Dhruv Gangwani (16012101009), Dharmit Saradva (16012101033), Raj Master (16012101012), of Ganpat University, towards the fulfillment of requirements of the degree of Bachelor of Technology – Computer Science and Engineering, is record of Summer Internship Project work, carried out by him/her in the CSE-Cloud Based Application Department. The results/findings contained in this Project have not been submitted in part or full to any other University/Institute for award of any other Degree/Diploma.
Signature of Head of Department:
Name of Head of Department: Prof.Dharmesh Darji
Signature of Internal Guide:
Name of Internal Guide: Prof. Nidhi Thacker
Place: Ganpat University
Internship is a good opportunity for learning and self-development. We consider me lucky and honored to have so many good people lead me through in completion of this project in internship. First, we would like to thank Dr. Hemal Shah, Head of Department, Computer Science and Engineering, who gave us an opportunity to undertake this project. Our grateful thanks to Prof. Nidhi Thacker for her guidance in project work. CSE department monitored our progress and arranged all facilities to make life easier. We choose this moment to acknowledge their contribution gratefully. We are also grateful to tutors of Softvan Technologies for helping in problems we faced.
Signature of Students
(Enrollment No: 16012101033)
(Enrollment No: 16012101009)
(Enrollment No: 16012101012)
I, hereby declare that this project work submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person nor material which has been accepted for the award of any other degree or diploma of the university or other institute of higher learning, except where due acknowledgment has been made in the text.
Place: Ganpat University
Signature of the Student
Name: Dhruv Gangwani
Enrollment No: 16012101009
Name: Dharmit Saradva
Enrollment No: 16012101033
Name: Raj Master
Enrollment No: 16012101012
Nowadays, virtual assistant is an important thing to make routine life easy. In business way, the virtual assistant is very useful to manage some work. It decreases human efforts for doing some small things. The virtual assistant is friendlier for everyone; it schedules your daily work very easily. Nowadays, it also combines with Internet of Things (IoT’s) object or project.
Amazon provides platform to build a skill, which operates your skill in your way. We use Amazon provides developer account for design Alexa. There are some steps to build Alexa Skill. For skill, there two accounts are required. One is Developer and second is Amazon Web Services (AWS) account. The AWS account contains a one lambda function, which operates the entire Alexa Skill. We can add database through lambda function. We use database to build Alexa skill. The database is provided by Amazon, which works on NoSQL database concept. Alexa supports many programming languages; here we used python language in lambda function.
What is Alexa
Working with Alexa
How to build skill
Related Database Services (RDS)
Related Database Services with MySQL
Connection with MySQL to Skill
In digital world, the use of artificial intelligence is increase day by day. The concept of virtual assistant is also a part of artificial intelligence. The virtual assistant is generally self-employed and provides professional, technical or creative assistance to clients remotely from a home to office. In earlier the virtual assistance is only used on smartphones, but now the latest devices are also supports this technology. The examples of virtual assistance are Google Voice, Skype, and Amazon Alexa etc. Here we use Amazon Alexa to build a virtual assistance in different platforms or stages for business, technical or daily routine.
Amazon Alexa is a virtual assistant developed by Amazon, first used in the Amazon Echo device and the Amazon Echo Dot device. Alexa is capable of voice interaction (taking input/output by voice), playing music, making notes, setting alarms, providing weather etc. We can extend the Alexa capabilities by installing “skills”. Alexa supported languages for user interaction are English, German, French and Japanese. A companion application is available from the Apple’s app store, Google’s Play store and Amazon App store. This application is used to manage Alexa-enabled devices to install skills, control music, manage alarms, and vies shopping lists. For skill developer, they can enable their skills using Alexa mobile application.
Here we use Amazon Alexa for implementing the skill to manage examination at College or University. In college, while exam is scheduled, the faculty having confusion about supervision. Sometimes there are so many charts or papers that make confusion and it spends more time for understanding that schedule. Sometimes they reach their class late, because of the paper work or paper schedule. It consumes more time and sometimes faculty reach wrong classes and they have to confirm class room with administrator.
So, for solution for this situation, we build a virtual assistant with Amazon Alexa. It is a very simple process; there is no need more papers for getting class room. If administrator put the data into database and Alexa fetch that data by date and tells the output which is requested by faculty. So this process become very easy and it don’t consume time. By implementing this project, the faculty gets actual data which is entered by admin. Which the help of this project, if faculty requests Alexa that “which subject’s exam on today?” then Alexa will reply the data from database. It will reduce the effort of faculties and get their actual destination.
Amazon Alexa works on voice commands. So it develops voice interaction with end user. We build the skill related exam management. It interacts with database’s query and returns the output to user. It works on internet connection, so it will always connect with database connection and retrieves the demanded data.
What is Alexa?
Alexa is a virtual assistant, has been around for about two years. It is inside Amazon Echo smart speaker, and smartphones. In smartphones, Alexa interacts with an application named “Alexa”. The Alexa works same as Apple’s Siri, Google Now and other virtual assistants. Alexa takes user voice commands as input and gives a perfect output which is desired by user. The user can interact via mobile application or Amazon’s Echo device ranges.
Fig. 1.1 Amazon Echo
Alexa has many inbuilt functions like reporting weather details which is provided by AccuWeather; it confirms your location by getting postal code of your area and get actual weather report. It also plays songs which is possible by enabling particular music’s skills. It can manage voice controlled alarms, timers and shopping and to-do lists and can access Wikipedia articles. In business level, Alexa can do conference calls, schedule meeting rooms, and custom skills designed by third party vendors.
Working with Alexa
Amazon also provides tools to build skills for developers. For developing Alexa skills, the developer can use Alexa Skills Kit by using developer’s account and this platform provides the front hand or design part of Alexa skill. The main logic or main code is written in many languages like Node.js, Python in 2.7 and higher version, C# or Go. This code is in lambda function. The developer can add their lambda function by using Amazon Web Services (AWS) account. Most skills run code almost entirely in the cloud. In the lambda function the sample blueprints are also provided by Amazon.
How to build skill in Alexa?
To build skill in Alexa there are two main accounts required: 1) Amazon Developer’s account and 2) Amazon Web Services. In Amazon developer account, the developer can build their front hand or design their Alexa. In developer console, developer can design Voice User Interface by giving or defining their intents. Intents contain the main voice commands or sample utterances. If user’s voice command contains those utterances then particular intent will called. The other account contains the main code which has controls on entire Alexa skill. That code is written in lambda function. Lambda function can support many languages but here we used Python language for giving back hand through lambda function to Alexa Skill.
Here are some steps to configure skills via developer account:
60007452070Sign in to Developer account
00Sign in to Developer account
6000751714500Create an invocation name. This is the word that user will speak to activate the skill.
0Create an invocation name. This is the word that user will speak to activate the skill.
6000751152525Name your skill. Ex: ExamManager
00Name your skill. Ex: ExamManager
600075619125In Alexa Skills Kit, choose Add a new Skill
0In Alexa Skills Kit, choose Add a new Skill
60007538100From the navigation bar, select Alexa
0From the navigation bar, select Alexa
Example: we used the invocation name “ganpat” User will
Say,” Alexa, ask ganpat” to interact with your skill.
600075817244Enter values of intents. Under sample utterances, enter all phrases that you think users might say to interact with your skill.
0Enter values of intents. Under sample utterances, enter all phrases that you think users might say to interact with your skill.
600075131445Create a custom intent. And give name to your custom intent. There will be inbuilt intents.
Create a custom intent. And give name to your custom intent. There will be inbuilt intents.
60007514605Select endpoint AWS Lambda ARN then paste your ARN code, and choose Next.
Select endpoint AWS Lambda ARN then paste your ARN code, and choose Next.
1343025170180Login to AWS management Console
00Login to AWS management Console
282892558159650281940051206400280987545205650282892538347650282892533394650282892528822650282892523869650280035018440400280035011868150281940052959002819400100965013430255968365Copy ARN displayed in the upper-right corner and pastes it to endpoint.
0Copy ARN displayed in the upper-right corner and pastes it to endpoint.
13430255273040The role is now populated with ‘lambda_basic_execution’ choose next
0The role is now populated with ‘lambda_basic_execution’ choose next
13430254663440When IAM role console opens, choose Allow
When IAM role console opens, choose Allow
13430253987165In Lambda function handler and role, select Create custom role
0In Lambda function handler and role, select Create custom role
13430253520439Name your function.
0Name your function.
13430253063240Set trigger to Alexa Skills Kit
Set trigger to Alexa Skills Kit
13430252548890Select Blueprints which ends in python
0Select Blueprints which ends in python
13430252015490In search box, type Alexa.
0In search box, type Alexa.
13430251339215Choose create a Lambda Function or Get started now to choose a blueprint
00Choose create a Lambda Function or Get started now to choose a blueprint
1343025691515Click the region and select US East (N.Virginia)
00Click the region and select US East (N.Virginia)
1343025253365From the list select Lambda services
0From the list select Lambda services
Databases with Alexa
The Amazon Web Services provides two ways to connect your skills with database: 1) Using DynamoDB database and 2) Using Relational Database Services (RDS). The DynamoDB database is one of the products of Amazon Web Services that provides Cloud Database and it also run on Cloud platform. The DynamoDB is inbuilt database for developing or providing database interface to particular skills. DynamoDB allows or runs on NoSQL database. This service is not free, if the user have Amazon Educate account then user can’t interact that services.
DynamoDB database automatically manages the data traffic of tables over multiple servers. DynamoDB differs from other Amazon services by allowing developers to purchase a service based on throughput, rather than storage. If there auto scaling is enabled, the database will scale automatically. Here we can use DynamoDB through python with help of ‘boto3’ package.
Related Database Services (RDS):
Here there is another way to use or integrate database services with Alexa skills. With using Relational Database Service makes easy to set up, operate, and scale a relational database in the cloud. RDS is available on several database instance types and provides you with different engines, including Aurora, PostgreSQL, MySQL, MariaDB, Oracle and Microsoft SQL server. Here we used MySQL engine for database integration in our skills. For MySQL, RDS provides a selection of instance types optimized to fit different relational database use case. Each instance type includes one or more instance sizes.
Related Database Services with MySQL
Connection with MySQL to Alexa Skills
In here we used database by using Amazon RDS services. We can directly connect MySQL workbench to Amazon RDS. For accessing this facility, first we have to create instance that contain Database Connectivity. To create an Amazon RDS MySQL DB instance, we have to use Amazon RDS management tools or interfaces. Amazon RDS manages backups, software patching, automatic failure detection and recovery.
There are some steps to launch MySQL DB instance:
Sign into AWS Management Console and open RDS console
In that console, top right corner choose the region in which you want to create DB instance
In navigation pane, choose instances
In instances, choose Launch DB instance to start the Launch DB instance wizard.