Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Youtube

Github Stackoverflow Pinterest

Make a robot talk to you


Overview

Amazon Lex works through an Alexa Echo and Alexa’s natural language understanding to hold natural voice conversational interactions with yoru chatbot programs running on Amazon Lamba (serverless) programs.

  1. The marketing page for Lex is at:

    https://aws.amazon.com/lex

    Architecture

    Hira Niranjan, Lex Product Manager shows this diagram in Introducing Amazon Lex: Service for Building Voice/Text Chatbots [20:20] Mar 6, 2017

    aws-lex-arch-748x342

    Value of Amazon

    The value Lex provides developers is pre-integration with Amazon’s other services:

    • Security
    • Authentication Cognito
    • Mobile Hub connectors to business applications

    Video: Enhance Your Mobile Apps with AI Using Amazon Lex [36:17] (MBL307) at AWS re:Invent 1 Dec 2016 by Rohan Despande, Sr. Software Engineer

    • Amazon Pinpoint for targeted push notifications on mobile phones

    • Rekognition is Amazon’s image recognition service video to recognize faces, objects, and scenes so it can search, verify, and organize images. It outputs names of objects with a confidence level.

    Pricing

  2. Click Pricing

    Amazon charges 75 cents per 1,000 text messages and $4 per 1,000 speech messages.

    New customers the first year get free the equivalent of:

    • 10,000 text / 1,000 x .75 = $75
    • 5,000 speech / 1,000 x $4 = $20

Competitors

Systems similar to Amazon lex include:

Use Cases for Conversational Commerce

COOL: NASA’s demo controlling a JPL Mars rover using Lex at AWS re:Invent 2016 Introducing Amazon Lex (MAC304) Dec 3, 2016

  • Rovi, How big is Mars?
  • Rovi, drive forwards

aws-lex-rovi-arch-535x358

Other ways:

  • Information kiosks
  • Front-end to IOT (RaspPi)

Other videos:

  • Building Serverless Chat Bots Sep 8, 2016 by Leo Zhandanovsky, Amazon Solutions Architect says “ChatOps is an approach to communicate that allows teams to collaborate and manage their (work) from a chat room”.

  • awschatbot.devpost.com

### Utterances

Instead of using an Alexa program name, users can invoke a specific intent (program) by saying:

  • “Alexa, I would like to book a hotel”
  • “Alexa, I would like to pick up flowers”
  • “Alexa, I would like to order a ride”
  • “Alexa, I would like to see a dentist”

Conversational commerce (not just Lex)

From video Announcing Amazon Lex - January 2017 [28:32] by Vikram Anbazhagan in AWS Online Tech Talks

Informational bots:

  • News updates
  • Weather information
  • Game scores

Application bots:

  • Buy tickets
  • Order food
  • Manage bank accounts

Enterprise productivity bots:

  • Sales numbers
  • View performance of marketing
  • Inventory status

IOT bots:

  • Wearables
  • Appliances
  • Auto

IDEA: Provide predictions on the above.

Create a Lex chatbot

This video walks through use of the Lex Console to create a voice conversational chatbot while it was in preview mode:

Console

  1. Lex Console

    https://console.aws.amazon.com/lex

    AI Services

    Alternately, from among a list of all Amazon’s services, Lex is within AI services: https://aws.amazon.com/amazon-ai

    aws-svcs-ai-204x139-8k

    Video: Overview of AI in the AWS Platform

    Add Some Personality

    IDEA: I’d like to put in some personality, like I’m having a conversation with a comic:

    • An encouraging response like a grandma.
    • Insults from Don Rickles or Sheakespeare or Mark Twain.
    • Self-Deprecating humor like Rodney Dangerfield.
    • Funny Observerations like from Jerry Seinfeld or Sarah Silverman or other comics.

    Adjustment of tone in voice would enable:

    • Sexual inuendos like from Mae West.
    • A British (butler) accent with sarcasm as I’m doing a banking task.
    • Dead-pan like that “Bueller” guy.

In Settings:

Slots - Usage

Slots are input data.

Amazon provides a City slot that has the world’s major cities.

Lex remembers the user’s context (what occurred before and user’s perferences).

Voices

The initial release of Lex are in English US voices, a subset of voices from Amazon Polly is a Text-to-Speech (TTS) cloud service that converts text into lifelike speech.

https://aws.amazon.com/blogs/aws/polly-text-to-speech-in-47-voices-and-24-languages/

Female:

  • Joanna sounds the most natural to me.
  • Salli
  • Kimberly has a bit of a raspy voice
  • Kendra is a deeper voice, the most “athoratative” to me.
  • Ivy sounds like a girl (about 10 years old is my guess)

Male:

  • Justin sounds like a young boy
  • Joey

IDEA: Having a child voice can enhance a bot to help shopping for children.

Used on website https://germanverbs.lang.global/

  1. Write a long sentence of your own and hear it pronounced and saved into an mp3 file on:

    https://console.aws.amazon.com/polly/home/SynthesizeSpeech

    QUESTION: Can additional custom lexicons be specified like in https://console.aws.amazon.com/polly/home/Lexicons

Channels

“Channels” send data to other applications, such as Facebook, Slack, or Twilio to send SMS or email.

These all use IAM Role AWSServiceRoleForLexChannels

Slack channel

Do this first. This is free. And you can keep it private. It’s not behind a firewall/VPN. It’s better and easier than IRC. It has built-in archival of communications.

  1. Get the mobile app for Slack:
  • https://play.google.com/store/apps/details?id=com.Slack&hl=en
  • https://itunes.apple.com/app/slack-team-communication/id618783545
  1. Pick an outgoing Slack webhook

    They make use of normal HTTP requests with a JSON payload.

  2. Integrate Slack with integrations

    • When there is a commit to GitHub, send to Slack.

    • PagerDuty, JIRA, NewRelic, DataDog.

    • Meekan.com - schedule meetings
    • Yeobot for SQL queries against AWS account metadata
    • Burnerapp.com SMS/voicemail to slack, two-way
    • Statuspage.io - integrate public and private status feeds
  3. Create a Slack channel to receive incoming Slack webhooks:

    https://slack.com/create#email

    Docs: https://get.slack.help/hc/en-us/articles/201402297-Create-a-channel

  4. Secure your Slack with two-factor authentication

  5. Scope AWS IAM policies

Facebook

This is free.

Twilio to send SMS or email

This costs money.

Others?

Twitter? Skype? LinkedIn? Yammer? WhatsApp?

Monitoring

IAM role AWSServiceRoleForLexBots

  • Traffic by channel

  • Missed utterances count

  • Request Latency