Giter Club home page Giter Club logo

serverless-aws-alexapolyskill's Introduction

Alexapolyskill

Amazon Alexa Skill and Serverless web application built using PYTHON | HTML 5 | CSS 3| JAVASCRIPT and Amazon AWS services S3 | API GateWay | Lambda | DynamoDB | SNS | Poly


Goal:

The goal is to build Scalable web application using serverless architecture which converts text to audio mp3 files and creates an Alexa skill which can read these audio files on command from user.


Architecture:


Serverless Website

alt text

Amazon s3 contains all the html files and converted audio files

Api gateway invokes lambda functions basing on user request type

for instance

get  request invokes get post lambda function
post request invokes New Post lambda function etc.

Each lambda function has a unique responsibility.

get post lambda function retrives all the posts from dynamo db and audio files from s3

New post lambda function inserts posts into dynamo db and inserts a message into SNS topic which inturn triggers another lambda function (Convert to Audio) which uses text from dynamo db and converts it into mp3 and store it in s3 service.

Amazon poly is aws service which converts text to Audio.

Amazon SNS(simple notification service) is asynchronous service which invokes convert to audio lambda function when message is arrived.

Amazon Dynamodb is amazon nosql db service which is used for storing and retriving of the posts.


Alexa skill


alt text


Technology stack


alt text


Area Technology
Front-End HTML5, CSS3, JAVASCRIPT
Back-End Python
Database Dynamo DB(Aws Cloud Service)
Images Storage Amazon AWS-S3
Other Aws Services API GateWay | Lambda | DynamoDB | SNS | Poly | Amazon Alexa Skill Set

Features:

Serverless website

alt text

First user need to enter input text and then select voice from the list.

Then click on button Say it

Now in the background processing happens and then mp3 files are generated.

To retrive the files type * in the text box and then click on search button.

It retrives all the mp3 files that are converted and stored in S3 bucket. (Refer below screen shot)


alt text


Now user can download all the files.

Last but not least build amazon alexa skill which uses the audio files present in s3 bucket.

Steps to create Alexa Skill

• login to alexa website

 while logging into the alexa website ( amazon.alexa.com ) use the same email address as for alexa developer services

• click on alexa skill kit

 then create skill

• fill the necessary details like skill name and details

• Now chooose a model to add your skill

• Select custom skill and then create skill

Now it will create skill interface now we need to fill four details which are  stated below

Invocation Name : simply name to invoke your skill

Intents Samples and Slots

Build Model

Endpoint

• Now Add intent GetNewFactIntent

• then configure sample utterances like

tell me a fact

give me a fact

help me study

tell me something

• save model

• build model

(* takes some time)

• Now in case of endpoint supply alexa portal with aws resource name

• go back to aws console and create new lambda function

blue print and type alexa

then select alexa-skill-kit-sdk-factskill

enter name and role choose an existing role

and create a function

• go to designer and then add triggers

alexa skills kit

after saving create new file index.js

alexa lab src contains that file index.js

• Now go s3 bucket where your audio files are stored and then

• Select the links and paste them in the code

• Save the file

• Save the lambda function

• Copy the arn and go to alexa developer window and paste the arn

• Save the end points and click save

• Now go to test the skill and test it

you can also test it in real life i.e by using amazon alexa echo or echo dot

So through echo dot or alexa echo based on your invocation name and utterances it will start replying with audio mp3 files that's it.

serverless-aws-alexapolyskill's People

Contributors

rahulkadamid avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.