SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
Develop Alexa SkillsDevelop Alexa Skills
for Amazon Echo with PHPfor Amazon Echo with PHP
AWS Tech Community Days, Cologne, 27/09/2017AWS Tech Community Days, Cologne, 27/09/2017
Ralf EggertRalf Eggert
CEO Travello GmbH, Trainer, Author, Coach,CEO Travello GmbH, Trainer, Author, Coach,
PHP Developer & Alexa Skill DeveloperPHP Developer & Alexa Skill Developer
Three questions!Three questions!
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 44 fromfrom 5858
AgendaAgenda
Amazon Alexa Basics 
Prepare skill 
Why PHP?
Implement skill code
Learnings 
Amazon Alexa BasicsAmazon Alexa Basics
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 66 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service


AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 77 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service

Voice Command

AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 88 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service

Voice Command
Voice Request

AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 99 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service

Voice Command
Voice Request
JSON Request

AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1010 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service

Voice Command
Voice Request
JSON Request
JSON Response
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1111 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service
Text Response

Voice Command
Voice Request
JSON Request
JSON Response
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1212 fromfrom 5858
How does an Alexa request work?How does an Alexa request work?
AWS
Lambda
Function
Alexa Voice Service
Text Response

Voice Response
Card Response
Voice Command
Voice Request
JSON Request
JSON Response
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1313 fromfrom 5858
Alternative requestAlternative request
HTTPS
Endpoint
Server
Alexa Voice Service
Text Response

Voice Response
Card Response
Voice Command
Voice Request
JSON Request
JSON Response
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1414 fromfrom 5858
Alexa Voice Service (AVS)Alexa Voice Service (AVS)
Alexa Voice Service
Automatic
Speech
Recognition
(ASR)
Natural
Language
Understanding
(NLU)
Text
To
Speech
(TTS)
Voice
Command
Mapping
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1515 fromfrom 5858
Alexa Skills Kit (ASK)Alexa Skills Kit (ASK)
Alexa Skills Kit
Interaction-Model /
Skill Builder
Configuration
Publishing /
Privacy
Test
Service Simulator
Beta Test
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1616 fromfrom 5858
ASK OverviewASK Overview
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1717 fromfrom 5858
Alexa Skill BuilderAlexa Skill Builder
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1818 fromfrom 5858
AWS Lambda FunctionsAWS Lambda Functions
Why PHP?Why PHP?
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2020 fromfrom 5858
Possible solutionsPossible solutions
Compile PHP for AWS
Use supported runtime engine for AWS
Use own HTTPS endpoint server
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2121 fromfrom 5858
Use supported runtime engine?Use supported runtime engine?
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2222 fromfrom 5858
Compile PHP for AWS Lambda?Compile PHP for AWS Lambda?
https://goo.gl/N9VVvb
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2323 fromfrom 5858
Use own HTTPS endpoint server?Use own HTTPS endpoint server?
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2424 fromfrom 5858
Solution foundSolution found
Compile PHP for AWS
Use supported runtime engine for AWS
Use own HTTPS endpoint server
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2525 fromfrom 5858
Disadvantages own HTTPS endpointDisadvantages own HTTPS endpoint
Some dev-tools only work with Lambda (API, CLI)
Need to build own library for Alexa
Server administration
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2626 fromfrom 5858
Advantages own HTTPS endpointAdvantages own HTTPS endpoint
Use any software you want
Full control over server environment
Privacy concerns (soft concern)
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2727 fromfrom 5858
Open-source PHP libraryOpen-source PHP library
https://github.com/travello-gmbh/
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2828 fromfrom 5858
My current tech stackMy current tech stack
Prepare skillPrepare skill
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3030 fromfrom 5858
Create sample dialogsCreate sample dialogs
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3131 fromfrom 5858
Sample dialog ISample dialog I
Alexa, start my zoo! 
Welcome to your zoo.
Please name an animal in my zoo! 
An elephant lives in your zoo.
Thanks, Alexa. 
You are welcome.
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3232 fromfrom 5858
Sample dialog IISample dialog II
Alexa, start my zoo! 
Welcome to your zoo.
How many animals live in my zoo? 
42 animals live in your zoo.
Thanks, Alexa. 
You are welcome.
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3333 fromfrom 5858
Create flow diagramsCreate flow diagrams
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3434 fromfrom 5858
Flow diagrammFlow diagramm
Welcome to
your zoo
Start my zoo
An elephant
lives in your zoo
42 animals
live in your zoo
»name« »number«
»name« »number«
You're welcome
»thanks« »thanks«
»thanks«
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3535 fromfrom 5858
Configure Alexa Skills KitConfigure Alexa Skills Kit
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3636 fromfrom 5858
Create custom slot typesCreate custom slot types
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3737 fromfrom 5858
Create custom intentsCreate custom intents
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3838 fromfrom 5858
Configure HTTPS endpointConfigure HTTPS endpoint
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3939 fromfrom 5858
Configure SSL certificateConfigure SSL certificate
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4040 fromfrom 5858
Test HTTPS endpointTest HTTPS endpoint
Implement skill codeImplement skill code
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4242 fromfrom 5858
Install sample applicationInstall sample application
$ git clone https://github.com/travello-gmbh/example-zoo-skill
$ cd example-zoo-skill
$ composer install
$ sudo chmod -R 777 data/cache/
// setup a virtual host for http://example-zoo-skill
// with the example-zoo-skill/html/ path as doc root
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4343 fromfrom 5858
Test sample applicationTest sample application
/data/postman/collection.json
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4444 fromfrom 5858
Update text fileUpdate text file
return [
'alexaLaunchTitle' => 'Welcome',
'alexaLaunchMessage' => 'Welcome to my zoo',
'alexaRepromptMessage' => 'Another animal or cancel?',
'alexaHelpTitle' => 'Help',
'alexaHelpMessage' => 'You can ask me which animal ' .
'lives in your zoo or how many animals live there.',
'alexaCancelTitle' => 'Thanks',
'alexaCancelMessage' => 'Thanks and see you soon!',
'alexaStopTitle' => 'Thanks',
'alexaStopMessage' => 'Thanks and see you soon!',
'alexaAnimalTitle' => 'An animal',
'alexaAnimalMessage' => '%1$s lives in your zoo!',
'alexaCountTitle' => 'Animal census',
'alexaCountMessage' => '%1$s animals live in your zoo!',
];
/data/texts/zoo.common.texts.de-DE.php
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4545 fromfrom 5858
Create text helper classCreate text helper class
<?php
namespace ZooApplicationHelper;
use TravelloAlexaLibraryApplicationHelperAbstractTextHelper;
class ZooTextHelper extends AbstractTextHelper implements ZooTextHelperInterface
{
public function getAnimalTitle(): string
{
return $this->commonTexts[$this->locale]['alexaAnimalTitle'];
}
public function getAnimalMessage(string $animal): string
{
return sprintf($this->commonTexts[$this->locale]['alexaAnimalMessage'], $animal);
}
public function getCountTitle(): string
{
return $this->commonTexts[$this->locale]['alexaCountTitle'];
}
public function getCountMessage(int $count): string
{
return sprintf($this->commonTexts[$this->locale]['alexaCountMessage'], $count);
}
} /module/Zoo/src/Application/Helper/ZooTextHelper.php
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4646 fromfrom 5858
Create zoo application ICreate zoo application I
<?php
namespace ZooApplication;
use TravelloAlexaLibraryApplicationAbstractAlexaApplication;
use TravelloAlexaLibraryRequestRequestTypeIntentRequestType;
use ZooApplicationHelperZooTextHelperInterface;
class ZooApplication extends AbstractAlexaApplication
{
protected function handleIntentRequest(): bool
{
$intentRequest = $this->alexaRequest->getRequest();
switch ($intentRequest->getIntent()->getName()) {
case 'AnimalIntent':
return $this->animalIntent();
case 'AMAZON.StopIntent':
return $this->stopIntent();
/* ... */
}
}
}
/module/Zoo/src/Application/ZooApplication.php
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4747 fromfrom 5858
Create zoo application IICreate zoo application II
<?php
namespace ZooApplication;
use TravelloAlexaLibraryResponseCardStandard;
use TravelloAlexaLibraryResponseOutputSpeechSSML;
class ZooApplication extends AbstractAlexaApplication
{
private function animalIntent(): bool
{
$zooMessage = $this->textHelper->getAnimalMessage('An elephant');
$this->alexaResponse->setOutputSpeech(new SSML($zooMessage));
$this->alexaResponse->setCard(new Standard(
$this->textHelper->getAnimalTitle(),
$zooMessage,
$this->smallImageUrl,
$this->largeImageUrl
));
return true;
}
}
/module/Zoo/src/Application/ZooApplication.php
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4848 fromfrom 5858
Test zoo applicationTest zoo application
/data/postman/collection.json
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4949 fromfrom 5858
More featuresMore features
Session attributes step2→
Second intent step4→
https://github.com/travello-gmbh/example-zoo-skill
Species slot type step3→
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5050 fromfrom 5858
Coming soon in Library 2.0Coming soon in Library 2.0
https://github.com/travello-gmbh/amazon-alexa-skill-library
Introducing Intent classes
Automatic intent handling
LearningsLearnings
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5252 fromfrom 5858
Early successEarly success
6 months top 10 activated skills
75.000 customers so far
64 customer reviews so far
2.500.000 utterances so far
Most accessed DE skill in 05/2017
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5353 fromfrom 5858
Biggest challengesBiggest challenges
First name slot type
Signature validation
Category slot type intents→
Chance to break first skill
2nd server for tests
More complex VUI / CUI
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5454 fromfrom 5858
Certification processCertification process
7 days for feedback (02/2017)
Signature validation issue
16 hours to go live (07/2017)
Single-word invocation issue
0 issues
»abbrechen« intent issue
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5555 fromfrom 5858
Development numbersDevelopment numbers
10 working days total
80% for infrastructure code
15 working days total
90% for skill code
20% for skill code
10% for infrastructure code
AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5656 fromfrom 5858
LearningsLearnings
Start with simple skill
Test thoroughly
Write a solid code base
Build more than one skill
Design a sophisticated VUI
Do not trust slot-types blindly
Have fun!
Questions?Questions?
Thanks!Thanks!
Mail: ralf@travello.audioMail: ralf@travello.audio
Web: www.travello.audioWeb: www.travello.audio

Contenu connexe

Tendances

Tendances (20)

Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home Skill
 
How to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless ArchitectureHow to develop Alexa Skill Kit based on Serverless Architecture
How to develop Alexa Skill Kit based on Serverless Architecture
 
Alexa in 10 minutes
Alexa in 10 minutesAlexa in 10 minutes
Alexa in 10 minutes
 
Alexa Skills Kit
Alexa Skills KitAlexa Skills Kit
Alexa Skills Kit
 
WKS403 Build an Alexa Skill using AWS Lambda
WKS403 Build an Alexa Skill using AWS Lambda WKS403 Build an Alexa Skill using AWS Lambda
WKS403 Build an Alexa Skill using AWS Lambda
 
Amazon Echo
Amazon EchoAmazon Echo
Amazon Echo
 
Voice enable all the things with Alexa
Voice enable all the things with AlexaVoice enable all the things with Alexa
Voice enable all the things with Alexa
 
Your First Amazon Alexa Skill
Your First Amazon Alexa SkillYour First Amazon Alexa Skill
Your First Amazon Alexa Skill
 
ALX402_Oh No, I Got Featured
ALX402_Oh No, I Got FeaturedALX402_Oh No, I Got Featured
ALX402_Oh No, I Got Featured
 
Amazon Alexa Workshop
Amazon Alexa WorkshopAmazon Alexa Workshop
Amazon Alexa Workshop
 
Alexa for Developers
Alexa for DevelopersAlexa for Developers
Alexa for Developers
 
Alexa Skills Kit with Web API on Azure
Alexa Skills Kit with Web API on AzureAlexa Skills Kit with Web API on Azure
Alexa Skills Kit with Web API on Azure
 
Alexa bootcamp - Skill building 101
Alexa bootcamp - Skill building 101Alexa bootcamp - Skill building 101
Alexa bootcamp - Skill building 101
 
Please meet Amazon Alexa and the Alexa Skills Kit
Please meet Amazon Alexa and the Alexa Skills KitPlease meet Amazon Alexa and the Alexa Skills Kit
Please meet Amazon Alexa and the Alexa Skills Kit
 
Amazon Alexa
Amazon AlexaAmazon Alexa
Amazon Alexa
 
Building voice enabled Apps with Alexa voice service and Amazon Lex.
Building voice enabled Apps with Alexa voice service and Amazon Lex.     Building voice enabled Apps with Alexa voice service and Amazon Lex.
Building voice enabled Apps with Alexa voice service and Amazon Lex.
 
Amazon Alexa - Introduction & Custom Skills
Amazon Alexa - Introduction & Custom SkillsAmazon Alexa - Introduction & Custom Skills
Amazon Alexa - Introduction & Custom Skills
 
Amazon Alexa Development Overview
Amazon Alexa Development OverviewAmazon Alexa Development Overview
Amazon Alexa Development Overview
 
ALX319_It’s All in the Data
ALX319_It’s All in the DataALX319_It’s All in the Data
ALX319_It’s All in the Data
 
Alexa, nice to meet you!
Alexa, nice to meet you! Alexa, nice to meet you!
Alexa, nice to meet you!
 

Similaire à Develop Alexa Skills for Amazon Echo with PHP

Similaire à Develop Alexa Skills for Amazon Echo with PHP (20)

Learnings Building Alexa Skills with PHP
Learnings Building Alexa Skills with PHPLearnings Building Alexa Skills with PHP
Learnings Building Alexa Skills with PHP
 
Learnings Building Alexa Skills with PHP
Learnings Building Alexa Skills with PHPLearnings Building Alexa Skills with PHP
Learnings Building Alexa Skills with PHP
 
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
Red Hat Nordics 2020 - Apache Camel 3 the next generation of enterprise integ...
 
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 ...
 
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
Enhancing Document-Centric Features with On-Premise Generative AI for Alfresc...
 
Ballerina - Cloud Native Programming Language
Ballerina - Cloud Native Programming LanguageBallerina - Cloud Native Programming Language
Ballerina - Cloud Native Programming Language
 
My First Big Data Application
My First Big Data ApplicationMy First Big Data Application
My First Big Data Application
 
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
10 Lessons Learned from using Kafka in 1000 microservices - ScalaUA
 
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:InventHow Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
 
Scala at Netflix
Scala at NetflixScala at Netflix
Scala at Netflix
 
Building an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBuilding an Apache Sling Rendering Farm
Building an Apache Sling Rendering Farm
 
Terraform - Taming Modern Clouds
Terraform  - Taming Modern CloudsTerraform  - Taming Modern Clouds
Terraform - Taming Modern Clouds
 
Real time data analytics - Part 2 - Sensors & Internet of Things
Real time data analytics - Part 2 - Sensors & Internet of ThingsReal time data analytics - Part 2 - Sensors & Internet of Things
Real time data analytics - Part 2 - Sensors & Internet of Things
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesOpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
 
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integrationSouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
SouJava May 2020: Apache Camel 3 - the next generation of enterprise integration
 
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS Glue
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS Glue
 
AWS Fargate Tutorial | AWS Tutorial For Beginners | AWS Certification Trainin...
AWS Fargate Tutorial | AWS Tutorial For Beginners | AWS Certification Trainin...AWS Fargate Tutorial | AWS Tutorial For Beginners | AWS Certification Trainin...
AWS Fargate Tutorial | AWS Tutorial For Beginners | AWS Certification Trainin...
 
How to build 1000 microservices with Kafka and thrive
How to build 1000 microservices with Kafka and thriveHow to build 1000 microservices with Kafka and thrive
How to build 1000 microservices with Kafka and thrive
 

Plus de Ralf Eggert

Plus de Ralf Eggert (20)

ChatGPT: unser täglich' Bot gib uns heute
ChatGPT: unser täglich' Bot gib uns heuteChatGPT: unser täglich' Bot gib uns heute
ChatGPT: unser täglich' Bot gib uns heute
 
Der ultimative PHP Framework Vergleich 2023 Edition
Der ultimative PHP Framework Vergleich 2023 EditionDer ultimative PHP Framework Vergleich 2023 Edition
Der ultimative PHP Framework Vergleich 2023 Edition
 
PHP Module als Rundum-Sorglos-Pakete entwickeln
PHP Module als Rundum-Sorglos-Pakete entwickelnPHP Module als Rundum-Sorglos-Pakete entwickeln
PHP Module als Rundum-Sorglos-Pakete entwickeln
 
Alexa, what's next?
Alexa, what's next?Alexa, what's next?
Alexa, what's next?
 
Alexa, wohin geht die Reise
Alexa, wohin geht die ReiseAlexa, wohin geht die Reise
Alexa, wohin geht die Reise
 
8. Hamburg Voice Interface Meetup
8. Hamburg Voice Interface Meetup8. Hamburg Voice Interface Meetup
8. Hamburg Voice Interface Meetup
 
Welcome Bixby
Welcome BixbyWelcome Bixby
Welcome Bixby
 
Alexa Skill Maintenance
Alexa Skill MaintenanceAlexa Skill Maintenance
Alexa Skill Maintenance
 
Vom Zend Framework zu Laminas
Vom Zend Framework zu LaminasVom Zend Framework zu Laminas
Vom Zend Framework zu Laminas
 
Alexa Skills und PHP? Passt das zusammen?
Alexa Skills und PHP? Passt das zusammen?Alexa Skills und PHP? Passt das zusammen?
Alexa Skills und PHP? Passt das zusammen?
 
Mit Jovo von 0 auf 100
Mit Jovo von 0 auf 100Mit Jovo von 0 auf 100
Mit Jovo von 0 auf 100
 
Vom Zend Framework zu Laminas
Vom Zend Framework zu LaminasVom Zend Framework zu Laminas
Vom Zend Framework zu Laminas
 
Alexa for Hospitality
Alexa for HospitalityAlexa for Hospitality
Alexa for Hospitality
 
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
Alexa, lass uns Geld verdienen – fünf Geschäftsmodelle, die wirklich funktion...
 
Fortgeschrittene Techniken für erfolgreiche Sprachanwendungen
Fortgeschrittene Techniken für erfolgreiche SprachanwendungenFortgeschrittene Techniken für erfolgreiche Sprachanwendungen
Fortgeschrittene Techniken für erfolgreiche Sprachanwendungen
 
Die sieben Projektphasen für Voice Projekte
Die sieben Projektphasen für Voice ProjekteDie sieben Projektphasen für Voice Projekte
Die sieben Projektphasen für Voice Projekte
 
Künstliche Intelligenz – Traum und Wirklichkeit
Künstliche Intelligenz – Traum und WirklichkeitKünstliche Intelligenz – Traum und Wirklichkeit
Künstliche Intelligenz – Traum und Wirklichkeit
 
Multi-Modal Voice Development with Amazon Alexa
Multi-Modal Voice Development with Amazon AlexaMulti-Modal Voice Development with Amazon Alexa
Multi-Modal Voice Development with Amazon Alexa
 
Mein Haus, mein Auto, mein Backend
Mein Haus, mein Auto, mein BackendMein Haus, mein Auto, mein Backend
Mein Haus, mein Auto, mein Backend
 
Zend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next GenerationZend/Expressive 3 – The Next Generation
Zend/Expressive 3 – The Next Generation
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Develop Alexa Skills for Amazon Echo with PHP

  • 1. Develop Alexa SkillsDevelop Alexa Skills for Amazon Echo with PHPfor Amazon Echo with PHP AWS Tech Community Days, Cologne, 27/09/2017AWS Tech Community Days, Cologne, 27/09/2017
  • 2. Ralf EggertRalf Eggert CEO Travello GmbH, Trainer, Author, Coach,CEO Travello GmbH, Trainer, Author, Coach, PHP Developer & Alexa Skill DeveloperPHP Developer & Alexa Skill Developer
  • 4. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 44 fromfrom 5858 AgendaAgenda Amazon Alexa Basics  Prepare skill  Why PHP? Implement skill code Learnings 
  • 5. Amazon Alexa BasicsAmazon Alexa Basics
  • 6. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 66 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service  
  • 7. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 77 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service  Voice Command 
  • 8. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 88 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service  Voice Command Voice Request 
  • 9. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 99 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service  Voice Command Voice Request JSON Request 
  • 10. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1010 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service  Voice Command Voice Request JSON Request JSON Response
  • 11. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1111 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service Text Response  Voice Command Voice Request JSON Request JSON Response
  • 12. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1212 fromfrom 5858 How does an Alexa request work?How does an Alexa request work? AWS Lambda Function Alexa Voice Service Text Response  Voice Response Card Response Voice Command Voice Request JSON Request JSON Response
  • 13. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1313 fromfrom 5858 Alternative requestAlternative request HTTPS Endpoint Server Alexa Voice Service Text Response  Voice Response Card Response Voice Command Voice Request JSON Request JSON Response
  • 14. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1414 fromfrom 5858 Alexa Voice Service (AVS)Alexa Voice Service (AVS) Alexa Voice Service Automatic Speech Recognition (ASR) Natural Language Understanding (NLU) Text To Speech (TTS) Voice Command Mapping
  • 15. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1515 fromfrom 5858 Alexa Skills Kit (ASK)Alexa Skills Kit (ASK) Alexa Skills Kit Interaction-Model / Skill Builder Configuration Publishing / Privacy Test Service Simulator Beta Test
  • 16. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1616 fromfrom 5858 ASK OverviewASK Overview
  • 17. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1717 fromfrom 5858 Alexa Skill BuilderAlexa Skill Builder
  • 18. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 1818 fromfrom 5858 AWS Lambda FunctionsAWS Lambda Functions
  • 20. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2020 fromfrom 5858 Possible solutionsPossible solutions Compile PHP for AWS Use supported runtime engine for AWS Use own HTTPS endpoint server
  • 21. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2121 fromfrom 5858 Use supported runtime engine?Use supported runtime engine?
  • 22. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2222 fromfrom 5858 Compile PHP for AWS Lambda?Compile PHP for AWS Lambda? https://goo.gl/N9VVvb
  • 23. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2323 fromfrom 5858 Use own HTTPS endpoint server?Use own HTTPS endpoint server?
  • 24. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2424 fromfrom 5858 Solution foundSolution found Compile PHP for AWS Use supported runtime engine for AWS Use own HTTPS endpoint server
  • 25. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2525 fromfrom 5858 Disadvantages own HTTPS endpointDisadvantages own HTTPS endpoint Some dev-tools only work with Lambda (API, CLI) Need to build own library for Alexa Server administration
  • 26. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2626 fromfrom 5858 Advantages own HTTPS endpointAdvantages own HTTPS endpoint Use any software you want Full control over server environment Privacy concerns (soft concern)
  • 27. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2727 fromfrom 5858 Open-source PHP libraryOpen-source PHP library https://github.com/travello-gmbh/
  • 28. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 2828 fromfrom 5858 My current tech stackMy current tech stack
  • 30. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3030 fromfrom 5858 Create sample dialogsCreate sample dialogs
  • 31. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3131 fromfrom 5858 Sample dialog ISample dialog I Alexa, start my zoo!  Welcome to your zoo. Please name an animal in my zoo!  An elephant lives in your zoo. Thanks, Alexa.  You are welcome.
  • 32. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3232 fromfrom 5858 Sample dialog IISample dialog II Alexa, start my zoo!  Welcome to your zoo. How many animals live in my zoo?  42 animals live in your zoo. Thanks, Alexa.  You are welcome.
  • 33. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3333 fromfrom 5858 Create flow diagramsCreate flow diagrams
  • 34. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3434 fromfrom 5858 Flow diagrammFlow diagramm Welcome to your zoo Start my zoo An elephant lives in your zoo 42 animals live in your zoo »name« »number« »name« »number« You're welcome »thanks« »thanks« »thanks«
  • 35. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3535 fromfrom 5858 Configure Alexa Skills KitConfigure Alexa Skills Kit
  • 36. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3636 fromfrom 5858 Create custom slot typesCreate custom slot types
  • 37. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3737 fromfrom 5858 Create custom intentsCreate custom intents
  • 38. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3838 fromfrom 5858 Configure HTTPS endpointConfigure HTTPS endpoint
  • 39. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 3939 fromfrom 5858 Configure SSL certificateConfigure SSL certificate
  • 40. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4040 fromfrom 5858 Test HTTPS endpointTest HTTPS endpoint
  • 42. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4242 fromfrom 5858 Install sample applicationInstall sample application $ git clone https://github.com/travello-gmbh/example-zoo-skill $ cd example-zoo-skill $ composer install $ sudo chmod -R 777 data/cache/ // setup a virtual host for http://example-zoo-skill // with the example-zoo-skill/html/ path as doc root
  • 43. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4343 fromfrom 5858 Test sample applicationTest sample application /data/postman/collection.json
  • 44. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4444 fromfrom 5858 Update text fileUpdate text file return [ 'alexaLaunchTitle' => 'Welcome', 'alexaLaunchMessage' => 'Welcome to my zoo', 'alexaRepromptMessage' => 'Another animal or cancel?', 'alexaHelpTitle' => 'Help', 'alexaHelpMessage' => 'You can ask me which animal ' . 'lives in your zoo or how many animals live there.', 'alexaCancelTitle' => 'Thanks', 'alexaCancelMessage' => 'Thanks and see you soon!', 'alexaStopTitle' => 'Thanks', 'alexaStopMessage' => 'Thanks and see you soon!', 'alexaAnimalTitle' => 'An animal', 'alexaAnimalMessage' => '%1$s lives in your zoo!', 'alexaCountTitle' => 'Animal census', 'alexaCountMessage' => '%1$s animals live in your zoo!', ]; /data/texts/zoo.common.texts.de-DE.php
  • 45. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4545 fromfrom 5858 Create text helper classCreate text helper class <?php namespace ZooApplicationHelper; use TravelloAlexaLibraryApplicationHelperAbstractTextHelper; class ZooTextHelper extends AbstractTextHelper implements ZooTextHelperInterface { public function getAnimalTitle(): string { return $this->commonTexts[$this->locale]['alexaAnimalTitle']; } public function getAnimalMessage(string $animal): string { return sprintf($this->commonTexts[$this->locale]['alexaAnimalMessage'], $animal); } public function getCountTitle(): string { return $this->commonTexts[$this->locale]['alexaCountTitle']; } public function getCountMessage(int $count): string { return sprintf($this->commonTexts[$this->locale]['alexaCountMessage'], $count); } } /module/Zoo/src/Application/Helper/ZooTextHelper.php
  • 46. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4646 fromfrom 5858 Create zoo application ICreate zoo application I <?php namespace ZooApplication; use TravelloAlexaLibraryApplicationAbstractAlexaApplication; use TravelloAlexaLibraryRequestRequestTypeIntentRequestType; use ZooApplicationHelperZooTextHelperInterface; class ZooApplication extends AbstractAlexaApplication { protected function handleIntentRequest(): bool { $intentRequest = $this->alexaRequest->getRequest(); switch ($intentRequest->getIntent()->getName()) { case 'AnimalIntent': return $this->animalIntent(); case 'AMAZON.StopIntent': return $this->stopIntent(); /* ... */ } } } /module/Zoo/src/Application/ZooApplication.php
  • 47. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4747 fromfrom 5858 Create zoo application IICreate zoo application II <?php namespace ZooApplication; use TravelloAlexaLibraryResponseCardStandard; use TravelloAlexaLibraryResponseOutputSpeechSSML; class ZooApplication extends AbstractAlexaApplication { private function animalIntent(): bool { $zooMessage = $this->textHelper->getAnimalMessage('An elephant'); $this->alexaResponse->setOutputSpeech(new SSML($zooMessage)); $this->alexaResponse->setCard(new Standard( $this->textHelper->getAnimalTitle(), $zooMessage, $this->smallImageUrl, $this->largeImageUrl )); return true; } } /module/Zoo/src/Application/ZooApplication.php
  • 48. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4848 fromfrom 5858 Test zoo applicationTest zoo application /data/postman/collection.json
  • 49. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 4949 fromfrom 5858 More featuresMore features Session attributes step2→ Second intent step4→ https://github.com/travello-gmbh/example-zoo-skill Species slot type step3→
  • 50. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5050 fromfrom 5858 Coming soon in Library 2.0Coming soon in Library 2.0 https://github.com/travello-gmbh/amazon-alexa-skill-library Introducing Intent classes Automatic intent handling
  • 52. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5252 fromfrom 5858 Early successEarly success 6 months top 10 activated skills 75.000 customers so far 64 customer reviews so far 2.500.000 utterances so far Most accessed DE skill in 05/2017
  • 53. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5353 fromfrom 5858 Biggest challengesBiggest challenges First name slot type Signature validation Category slot type intents→ Chance to break first skill 2nd server for tests More complex VUI / CUI
  • 54. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5454 fromfrom 5858 Certification processCertification process 7 days for feedback (02/2017) Signature validation issue 16 hours to go live (07/2017) Single-word invocation issue 0 issues »abbrechen« intent issue
  • 55. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5555 fromfrom 5858 Development numbersDevelopment numbers 10 working days total 80% for infrastructure code 15 working days total 90% for skill code 20% for skill code 10% for infrastructure code
  • 56. AWS Tech Community DaysAWS Tech Community DaysRalf EggertRalf Eggert 5656 fromfrom 5858 LearningsLearnings Start with simple skill Test thoroughly Write a solid code base Build more than one skill Design a sophisticated VUI Do not trust slot-types blindly Have fun!