SlideShare a Scribd company logo
Alexa, let’s make a
skill
@michaelpeacock
◇ Freelance developer
◇ Consultant CTO
◇ PHPNE organiser
◇ Occasional speaker and author
Our skill
◇ Conference bot
■ What is on in a particular room
■ What is a particular speaker talking about
Alexa Devices
Audio only
◇ Echo
◇ Echo Dot
◇ Echo Plus
Companion App
With a screen
◇ Echo Show
◇ Echo Spot
◇ Fire Tablet
◇ FireTV
FireTV Devices
Echo Show
Alexa Skill Flow
Two sides to skill
development
◇ Developer Console / Interaction Model
◇ Endpoint (your code)
Amazon Developer
Console
Create a new skill
Set a name (this is not what your users will say to invoke your skill)
Select a custom model
Skill builder
Anatomy of a skill
◇ Interaction model
◇ Interfaces
◇ Endpoint
Interaction Model
Interaction model defines how our users will interact with our
skill, and how certain voice commands should map to
different parts of our skill.
Invocation
Skills need to be invoked, to either open the skill, or tell
Alexa that we are wanting a command to processed by a
particular skill.
Setting an invokation name
Slot Types
◇ Before we worry about what our users want to do with
our skill
◇ We need to think about the variables they might want
to pass to us, so we can include them later.
Specify an ID
Built in Slot Types
Intents
Required Intents
Built-in intents
Custom Intents
Create a custom intent
Utterances
Save and build.
Serverless
Installation
npm install -g serverless
Create a project
serverless create --template aws-nodejs --path confoo
Skeleton Project: serverless.yml
Skeleton project: handler.js
Install Alexa SDK
npm install alexa-sdk
Handlers
Invoking a function locally
Authenticate
serverless config credentials 
--provider aws 
--profile confoo 
--key YOURKEY 
--secret YOURSECRET
Set the authentication profile: serverless.yaml
Deploy
serverless deploy
Lambda Testing
NB: Accessing IDs instead of the name
Lambda Trigger
Set the endpoint within the Alexa console
Testing the skill invocation
SSML
Speech Synthesis Markup Language
this.emit(':tell', '<say-as interpret-as="interjection">Oh boy</say-
as><break time="1s"/> this is just an example.');
Sessions
Persist data:
- DynamoDB permission
- alexa.dynamoDBTableName = 'OurSkillData';
- this.attributes[’key'] = ‘value’’;
Of note
◇ Alexa Serverless Plugin
◇ Alexa CLI
Thanks!
Any questions?
You can find me at:
◇ @michaelpeacock
Credits
Special thanks to all the people who made and released
these awesome resources for free:
◇ Presentation template by SlidesCarnival

More Related Content

Similar to Alexa, lets make a skill

Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
 Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski... Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
Amazon Web Services
 
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Amazon Web Services
 
WIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS ServicesWIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS Services
Amazon Web Services
 
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding WorkshopDigital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Dinah Barrett
 
Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home Skill
Jun Ichikawa
 
Lambda lambda-lambda
Lambda lambda-lambdaLambda lambda-lambda
Lambda lambda-lambda
Chris Mitchell
 
Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"
Fwdays
 
IT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hourIT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hour
Ionut Balan
 
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
Provectus
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
Amazon Web Services
 
Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...
Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...
Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...
Amazon Web Services
 
Building Voice Controls and Integrating with Automation Actions on an IoT Net...
Building Voice Controls and Integrating with Automation Actions on an IoT Net...Building Voice Controls and Integrating with Automation Actions on an IoT Net...
Building Voice Controls and Integrating with Automation Actions on an IoT Net...
Intel® Software
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
Ortus Solutions, Corp
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
Ashley Roach
 
Get Started Developing with Alexa and Drupal
Get Started Developing with Alexa and DrupalGet Started Developing with Alexa and Drupal
Get Started Developing with Alexa and Drupal
Amber Matz
 
Start building for voice with alexa
Start building for voice with alexaStart building for voice with alexa
Start building for voice with alexa
Eitan Sela
 
Build and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSBuild and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWS
mitesh_sharma
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
維佋 唐
 
Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!
Rafał Leszko
 
ITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike Callahan
ITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike CallahanITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike Callahan
ITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike Callahan
Ortus Solutions, Corp
 

Similar to Alexa, lets make a skill (20)

Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
 Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski... Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
Reimagining your user experience with Amazon Lex, Amazon Polly and Alexa Ski...
 
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
Building a Better .NET Bot with AWS Services - WIN205 - re:Invent 2017
 
WIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS ServicesWIN205-Building a Better .NET Bot with AWS Services
WIN205-Building a Better .NET Bot with AWS Services
 
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding WorkshopDigital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
Digital Muse “Girl Tech Fest - AWS Alexa Skills Coding Workshop
 
Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home Skill
 
Lambda lambda-lambda
Lambda lambda-lambdaLambda lambda-lambda
Lambda lambda-lambda
 
Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"Marcel Pociot "Alexa, let's build a voice-powered app"
Marcel Pociot "Alexa, let's build a voice-powered app"
 
IT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hourIT Camp 2019: How to build your first Alexa skill in under one hour
IT Camp 2019: How to build your first Alexa skill in under one hour
 
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
 
ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017ANZ Dev Lounge Session - Feb 2017
ANZ Dev Lounge Session - Feb 2017
 
Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...
Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...
Build a Game for Echo Buttons - an Alexa Gadget! (ALX405-R2) - AWS re:Invent ...
 
Building Voice Controls and Integrating with Automation Actions on an IoT Net...
Building Voice Controls and Integrating with Automation Actions on an IoT Net...Building Voice Controls and Integrating with Automation Actions on an IoT Net...
Building Voice Controls and Integrating with Automation Actions on an IoT Net...
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 
Get Started Developing with Alexa and Drupal
Get Started Developing with Alexa and DrupalGet Started Developing with Alexa and Drupal
Get Started Developing with Alexa and Drupal
 
Start building for voice with alexa
Start building for voice with alexaStart building for voice with alexa
Start building for voice with alexa
 
Build and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWSBuild and deployment with Jenkins and Code Deploy on AWS
Build and deployment with Jenkins and Code Deploy on AWS
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!Build Your Kubernetes Operator with the Right Tool!
Build Your Kubernetes Operator with the Right Tool!
 
ITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike Callahan
ITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike CallahanITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike Callahan
ITB2019 Easily Build Amazon Alexa skills with ColdFusion - Mike Callahan
 

More from Michael Peacock

Immutable Infrastructure with Packer Ansible and Terraform
Immutable Infrastructure with Packer Ansible and TerraformImmutable Infrastructure with Packer Ansible and Terraform
Immutable Infrastructure with Packer Ansible and Terraform
Michael Peacock
 
Test driven APIs with Laravel
Test driven APIs with LaravelTest driven APIs with Laravel
Test driven APIs with Laravel
Michael Peacock
 
Symfony Workflow Component - Introductory Lightning Talk
Symfony Workflow Component - Introductory Lightning TalkSymfony Workflow Component - Introductory Lightning Talk
Symfony Workflow Component - Introductory Lightning Talk
Michael Peacock
 
API Development with Laravel
API Development with LaravelAPI Development with Laravel
API Development with Laravel
Michael Peacock
 
An introduction to Laravel Passport
An introduction to Laravel PassportAn introduction to Laravel Passport
An introduction to Laravel Passport
Michael Peacock
 
Phinx talk
Phinx talkPhinx talk
Phinx talk
Michael Peacock
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
Michael Peacock
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
Michael Peacock
 
Powerful and flexible templates with Twig
Powerful and flexible templates with Twig Powerful and flexible templates with Twig
Powerful and flexible templates with Twig
Michael Peacock
 
Introduction to OOP with PHP
Introduction to OOP with PHPIntroduction to OOP with PHP
Introduction to OOP with PHP
Michael Peacock
 
Vagrant
VagrantVagrant
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friends
Michael Peacock
 
Evolution of a big data project
Evolution of a big data projectEvolution of a big data project
Evolution of a big data project
Michael Peacock
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012
Michael Peacock
 
Dealing with Continuous Data Processing, ConFoo 2012
Dealing with Continuous Data Processing, ConFoo 2012Dealing with Continuous Data Processing, ConFoo 2012
Dealing with Continuous Data Processing, ConFoo 2012
Michael Peacock
 
Data at Scale - Michael Peacock, Cloud Connect 2012
Data at Scale - Michael Peacock, Cloud Connect 2012Data at Scale - Michael Peacock, Cloud Connect 2012
Data at Scale - Michael Peacock, Cloud Connect 2012
Michael Peacock
 
Supermondays twilio
Supermondays twilioSupermondays twilio
Supermondays twilio
Michael Peacock
 
PHP & Twilio
PHP & TwilioPHP & Twilio
PHP & Twilio
Michael Peacock
 
PHP Continuous Data Processing
PHP Continuous Data ProcessingPHP Continuous Data Processing
PHP Continuous Data Processing
Michael Peacock
 
PHP North East Registry Pattern
PHP North East Registry PatternPHP North East Registry Pattern
PHP North East Registry Pattern
Michael Peacock
 

More from Michael Peacock (20)

Immutable Infrastructure with Packer Ansible and Terraform
Immutable Infrastructure with Packer Ansible and TerraformImmutable Infrastructure with Packer Ansible and Terraform
Immutable Infrastructure with Packer Ansible and Terraform
 
Test driven APIs with Laravel
Test driven APIs with LaravelTest driven APIs with Laravel
Test driven APIs with Laravel
 
Symfony Workflow Component - Introductory Lightning Talk
Symfony Workflow Component - Introductory Lightning TalkSymfony Workflow Component - Introductory Lightning Talk
Symfony Workflow Component - Introductory Lightning Talk
 
API Development with Laravel
API Development with LaravelAPI Development with Laravel
API Development with Laravel
 
An introduction to Laravel Passport
An introduction to Laravel PassportAn introduction to Laravel Passport
An introduction to Laravel Passport
 
Phinx talk
Phinx talkPhinx talk
Phinx talk
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
 
Powerful and flexible templates with Twig
Powerful and flexible templates with Twig Powerful and flexible templates with Twig
Powerful and flexible templates with Twig
 
Introduction to OOP with PHP
Introduction to OOP with PHPIntroduction to OOP with PHP
Introduction to OOP with PHP
 
Vagrant
VagrantVagrant
Vagrant
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friends
 
Evolution of a big data project
Evolution of a big data projectEvolution of a big data project
Evolution of a big data project
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012
 
Dealing with Continuous Data Processing, ConFoo 2012
Dealing with Continuous Data Processing, ConFoo 2012Dealing with Continuous Data Processing, ConFoo 2012
Dealing with Continuous Data Processing, ConFoo 2012
 
Data at Scale - Michael Peacock, Cloud Connect 2012
Data at Scale - Michael Peacock, Cloud Connect 2012Data at Scale - Michael Peacock, Cloud Connect 2012
Data at Scale - Michael Peacock, Cloud Connect 2012
 
Supermondays twilio
Supermondays twilioSupermondays twilio
Supermondays twilio
 
PHP & Twilio
PHP & TwilioPHP & Twilio
PHP & Twilio
 
PHP Continuous Data Processing
PHP Continuous Data ProcessingPHP Continuous Data Processing
PHP Continuous Data Processing
 
PHP North East Registry Pattern
PHP North East Registry PatternPHP North East Registry Pattern
PHP North East Registry Pattern
 

Recently uploaded

Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 

Recently uploaded (20)

Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 

Alexa, lets make a skill

Editor's Notes

  1. Conference bot – a skill to get information about a particular conference. We will use this to find out what is on in a particular room, and what a particular speaker is talking about. The interaction model maps what the user wants to do / find out about (the intent) to our code.
  2. Amazon has a whole suite of Alexa base devices which tend to have different features when it comes to processing skills. Its also possible for Alexa to be built into non-amazon devices.
  3. In this talk, we are focused around Audio only devices. These are the echo, echo dot and echo plus. They don’t have a screen, and so interaction with them is purely through audio commands.
  4. Although the echo doesn’t have a screen, the mobile application serves as a companion app. It displays data sent from the skill. It can be used to send rich media such as images, or just text. Its also handy for improving the performance of Alexa, as it tells you what the alexa device heard, letting you play the exact audio, and confirm that it did the right thing. This is only data you see relating to your devices, you cannot get this information for other devices / users of your skill.
  5. Some Alexa devices have a screen, but how they work is again slightly different. FireTV devices and Fire Tablets have Alexa support, but the interaction is essentially exclusively voice – the main difference is that you can display a “card” to the user, which contains companion information. The echo show does have touch screen support and both the show and spot have a camera built in, which allows a little more scope. You can use them to play videos, and there is support within the Alexa skills builders to support this.
  6. This is a fire TV response, in addition to reading out the answer, it shows up on the screen.
  7. And on the echo show.
  8. - Walk through the flow: user asks, device looks up model in alexa, that processes the intent and communicates with your skill (sends a JSON payload) which returns a response (JSON payload) which is then sent to the device to read out and to the companion app.
  9. Two sides to a skill: interaction model, and the endpoint (your code)
  10. Developer console
  11. Give the skill a name – this is just a name, its not used for users to interact with or invoke the skill
  12. There are some pre-built models for things like flash-briefing and audio playing skills, we want to create a custom skill, so we select that.
  13. Console. Items to configure on the left, checklist on the right, testing at the top.
  14. Anatomy: Interaction model, interfaces, endpoint. Interfaces = audio player, display interface for screen and voice interaction and video app for video playback.
  15. Interaction model defines how our users will interact with our skill, and how certain voice commands should map to different parts of our skill.
  16. Skills need to be invoked, to either open the skill, or tell Alexa that we are wanting a command to processed by a particular skill.
  17. Set an invokation name. Not a land grab.
  18. In order for Alexa to pass custom information back to our skill, we need to define some slot types. In the context of wanting to ask about a particular speaker or conference room, we would define these as slot types. Why? etc
  19. Geography: cities and states, only for certain countries. Date, time, numbers etc
  20. Cancel, stop and help
  21. Yes, No, stop, skip, and other media playback
  22. We want to build some custom intents for our skill. We will want one to tell us what talks are happening now in a particular room, one to tell us about a particular speaker and maybe one to tell us about a particular talk.
  23. Add intent – provide a name, and click create.
  24. Once we are in the intent management screen, we can scroll down to intent slots, where we can link a slot type to our intent, this allows us to inform alexa that this intent is going to make use of or expect data to be passed in in the form of a slot.
  25. We can configure the intent slot to make it mandatory
  26. Utterances – these are lists of things a user might say to alexa with the same intent. E.g. what is happening in room A, whats happening in room A, which talks are on in room A. These are all different ways of asking the same question. We need to provide as many different utterances as possible.
  27. Creating an utterance. Using curly brace lets us pull in a slot.
  28. Lots of utterances
  29. Within each section we need to save as we go along, however in order for the settings to be applied to our skill we need to build the skill. This allows the alexa service to essentially compile our intents, utterances and so on, so that it can apply it to incoming voice requests. This verifies the skill data, we cannot test the skill unless it has been built.
  30. Install serverless with node, using the –g flag to install it gloabllay on our system
  31. Run serverless create to create a new project. We are using the aws-nodejs template to tell serverless this is a project we will deploy to AWS (i.e. lambda functions) and we want to use nodejs. Lambda has support for Python, Node and Java. We also supply a path for where we want the project to be saved locally.
  32. The framework will then create a project for us, including some boiler plate, which contains a configuration file and a javascript file.
  33. Config file: service name – used as a prefix for the lambda function name when deploying. Details about the provider we will deploy to and the language being used, and a list of functions. These functions listed are how we map functions from our JS file to functions we want to deploy as stand alone Lambda functions. Our JS can have as many functions we want, for internal calls, however only exposed functions defined here are exposed as lambda functions which services such as alexa can call. It is also worth noting that if we want to run any of these functions with serverless, they have to be defined here too.
  34. Sample JS, just a function – not alexa specific here.
  35. Install alexa node sdk
  36. Import the SDK
  37. This function is our main handler, registered in our yaml file. We instantiate the alexa SDK, and we register some handlers, the handlers are the code which map to specific intents.
  38. Handlers are defined in an object, mapping the intent name, to a call back function to be executed. Here on our launch request, i.e. our skill loads up, we tell Alexa to say “welcome to conference bot” with the speak method, and we pass the name of the skill and the message welcome, to the card renderer. When it comes to deploying or testing this, this will result in JSON output which tells Alexa to do these things, we will come to it later.
  39. Since we want our skill to be able to tell us about rooms and talks and speakers, we need to give it access to that data. Ideally we would have our skill communicate with an API, but for the purposes of this demonstration, lets just have some data hard coded in. Since we are going to map slot value ids to data, we use those IDs as keys in our data array.
  40. We can put together some helper functions which take the IDs and return relevant data. For the purposes of testing this, I have also added these to my serverless.yml file so they can be locally tested.
  41. Finally, we can build up a handler for one of our intents. Here we take the intent from the request, and from that we take the ID of the conference room being provided. Because we are working with IDs and not just the value passed in, its nested quite far down the JSON that Alexa passes to us, but we will see that structure shortly. Once we have the ID, we can lookup the talks for that room, and tell Alexa to say something in response.
  42. To locally test a function, we can use the invoke local command within serverless, and tell it which function we want to invoke (must be exposed in serverless.yml) and pass some data. Based on our code, this means if I pass in my speaker ID it will tell me which talks I’m presenting.
  43. Now that we have a skill, we need to deploy it. To deploy it, we need to give serverless our AWS credentials. We can store this in the project if we want to, but that’s not good for security, we don’t want to just use some global settings, as we might have multiple AWS accounts, so instead we store the credentials against a profile. A profile is just a name we associate with the credentials. They are stored in our home directorry, so are not part of the project
  44. We then tell the project which authentication profile to use
  45. When we are ready to deploy, we just run serverless deploy.
  46. Serverless will then build a lambda stack for our project, zip up our function code, upload it to Amazons simple storaeg service, and link this to our new function.
  47. If we look at AWS lambda, we now have a number of functions, one for each defined in our serverless.yml file, the top one here being our Alexa entry point, the other two being ones created for local testing.
  48. Within the settings for our lambda function on AWS, there are some test options at the top, from here we can configure a test event. This essentially allows us to save a JSON payload which we will then fire at our lambda function, and be able to see the response from within the console.
  49. We should pick an alexa template, the MyColorIs is one which has a slot in it
  50. This is the template: it shows a sample alexa JSON payload, with a slot being provided, in this case it’s a colour with a value of blue.
  51. We can customise this to match our intent, our slot type and our slot value. NB: this is based off slot value (not IDs, so we will need to edit this to be based off an ID, however for the purposes of showing this, the skill code was set to work off the value)
  52. Here we see the response, and log output. We can log via console.log in our skill code, as I’ve done where it says ”Alexa, lets make a skill”
  53. This is the JSON request we would use for when an ID is provided. It shows how a value for a slot is resolved to an ID. Not too sure about the detail in here, but it seems to imply there could be other services which we could use to work out what slot value is being provided.
  54. Within the lambda configuration we can add a trigger, this tells lambda what is allowed to invoke or trigger the function
  55. We will select Alexa, which gives us some configuration options (next slide)
  56. Including if we want to restrict in bound requests to a specific skill id. If the skill id doesn’t match the function won’t invoke.
  57. Set the endpoint within the Alexa console. This is the opposite of what we have just done, here we tell Alexa that once the skill has been invoked and the intent and slots resolved, it should then send the request to our endpoint, which for us is a particular lambda function. The alternative to a lambda function is an HTTP endpoint.
  58. Testing via the console. Jump to the console and say “ask conference bot what is happening in fontaine e”, walk through the JSON in and out
  59. SSML: Speech synthesis markup language, lets us customise the voice response. All sorts of different things available, including spelling things out, saying numbers as words, changing emphasis, there are also specific words or sayings that alexa is pre-programmed to say in a specific way.
  60. Data peristance with Alexa can easily be done on a per skill-install basis. Give your Lambda function access to Dynamo db, give the Alexa SDK a table to use, and then just store data in this.attributes array.Alexa seamlessly handles this and stores the data mapped to an ID representing the user of the skill (i.e. this installation of the skill)
  61. Of note: alexa serverless plugin and improvements to the alexa CLI. Also interaction model can be defined as JSON.