echo_hello_world
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
echo_hello_world [2016/12/30 11:35] – tbrodeur | echo_hello_world [2016/12/31 14:13] (current) – tbrodeur | ||
---|---|---|---|
Line 4: | Line 4: | ||
</ | </ | ||
- | 1. < | + | |
+ | < | ||
+ | **Author:** Tristan Brodeur | ||
+ | |||
+ | **Email:** brodeurtristan@gmail.com | ||
+ | |||
+ | **Date:** Last modified on 12/29/16 | ||
+ | |||
+ | **Keywords: | ||
<color # | <color # | ||
</ | </ | ||
- | To create a lambda function, follow this tutorial: [[using_lambda|Creating a lambda function]] | + | <fs large> |
- | 2. <fs large> | + | {{ youtube>m8i3vgwMH3k? |
<color # | <color # | ||
</ | </ | ||
+ | |||
+ | 1. <fs large> | ||
+ | |||
+ | To create a lambda function, follow this tutorial: [[using_lambda|Creating a lambda function]] | ||
+ | |||
+ | <color # | ||
+ | </ | ||
+ | |||
+ | 2. <fs large> | ||
Line 62: | Line 79: | ||
speech_output = "Hello World" | speech_output = "Hello World" | ||
reprompt_text = "" | reprompt_text = "" | ||
- | should_end_session = False | + | should_end_session = True |
return build_response(session_attributes, | return build_response(session_attributes, | ||
Line 96: | Line 113: | ||
#################################################################### | #################################################################### | ||
</ | </ | ||
+ | |||
+ | <fc #4682b4> | ||
+ | ******Make sure to change the application id listed in lambda_handler() to your own id once you create the Alexa Skill with Alexa Skills Kit******</ | ||
<color # | <color # | ||
Line 182: | Line 202: | ||
</ | </ | ||
+ | Looking at the say_hello function, | ||
+ | |||
+ | <code python> | ||
+ | def say_hello(): | ||
+ | session_attributes = {} | ||
+ | card_title = "Hello World" | ||
+ | speech_output = "Hello World" | ||
+ | reprompt_text = "" | ||
+ | should_end_session = True | ||
+ | |||
+ | return build_response(session_attributes, | ||
+ | card_title, speech_output, | ||
+ | </ | ||
+ | |||
+ | we can see that the function returns a build_response function that will pass arguments defined in the say_hello function. | ||
+ | |||
+ | -card_title: | ||
+ | |||
+ | -speech_output: | ||
+ | |||
+ | -should_end_session: | ||
+ | |||
+ | <color # | ||
+ | </ | ||
After the code is added, [[using_alexa_skills_kit|configure your lambda function with the Alexa Skills Kit.]] | After the code is added, [[using_alexa_skills_kit|configure your lambda function with the Alexa Skills Kit.]] |
echo_hello_world.1483126551.txt.gz · Last modified: by tbrodeur