Git Product home page Git Product logo

serverless-polly's Introduction

AWS Serverless and NLP Part 1 - Text-to-Speech with Lambda and Polly

Prologue

Read this in Türkçe.

This is the first part of our NLP with AWS series. We are going to develop a web application without using any server or container but only AWS Serverless services. We are going to use Polly, Lambda, API Gateway, S3 ve DynamoDB and Javascript ES7 as backend language.

Serverless-Polly is a "Text-to-Speech" application runs entirely under AWS Serverless tools. It gets a text from a static web UI and saves it to DynamoDB through a Lambda function (newpost). After record has been saved, it is sent to a new Lambda function (convertaudio) via DynamoDB Streams. This record then sent to Polly to get a speech audio stream and that stream saved to an S3 bucket for later use. 3rd lambda function (getpost) is used for getting these processed mp3 files to same static web UI.

For the deployment of serviecs and web application, we are going to follow "Infrastructure as Code" principles. Amazon CloudFormation and Serverless Framework will help to make sure all these services deployed correctly.

Before we get to the details, it is really easy to install and run the project. You just need to do:

  1. Create an AWS account and create a user that has AccessKey and Secret
  2. Node.js v8.11.1
  3. Open a terminal window and type
  4. npm install serverless -g
  5. npm install
  6. serverless deploy
  7. Update API Gateway endpoint inside static/scripts.js
  8. Upload static/ folder to newly created S3 bucket via aws s3 sync --acl public-read static/ s3://S3BUCKETNAME

InstallationGif

Live application example:

PollyUI

Service Diagram

All services that we have used in this project are AWS's as a service solutions. All the infrastructure are handled by AWS but of course architecture and usage's of these services needs to be the responsibility of the developer. You can find the service diagram of application below:

Service Diagram

serverless-polly's People

Contributors

aykutaras avatar dependabot[bot] 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.