Archive

Showing posts tagged with Big Nerd Ranch

The Amazon Alexa team has collaborated with Big Nerd Ranch, known globally for its highly effective immersive development bootcamps and app development services, to develop deep technical training courses for the Alexa Skills Kit. Today we launch a new developer education experience that showcases all the free learning materials created in collaboration with Big Nerd Ranch.

Our six educational modules will dive into building voice user interfaces using the Alexa Skills Kit. The training materials will teach you about the Alexa skill architecture and interface configuration, slots and utterances, sessions and voice user interfaces, persistence, account linking, and certification and testing.

Each module page features a variety of learning materials:

Short and sweet videos you can easily share, save for later, or add to your own playlist on YouTube,

Learning objectives that summarize what you will learn,

Reference links to find more about Alexa Skills Kit features and technologies covered in the training,

Last month we released the first two videos in the Alexa video series created by developer education company Big Nerd Ranch. You can find parts 1 and 2 on the official YouTube Alexa Developers channel. Today we are excited to reveal the next two videos in the Big Nerd Ranch series on how to develop Alexa skills locally with Node.js.

In part 3 of 6, “Sessions and Voice User Interfaces”, we will learn about user sessions. This feature allows an Alexa skill to break more complicated data requirements into a series of steps spanning multiple requests to the skill service. We’ll also learn about Amazon’s voice user interface requirements. Following these requirements is important for getting a skill certified for public availability in the Alexa app. Lastly, we’ll introduce home cards. Cards are a graphical user interface element that can be sent from a skill to the Alexa app.

In part 4 of 6, “Persistence”, we will discuss how to link an Alexa skill with a database so that it can save an unfinished user interaction for later use in another session. Having the ability to persist data between Alexa sessions opens the door for far more versatile and sophisticated skills. We will see how to use Amazon DynamoDB to easily read and write data from an AWS Lambda function skill. We will use a library called Dynasty to interact with Amazon DynamoDB and handle asynchronous results more easily and elegantly.

Stay tuned for the last two videos from Big Nerd Ranch later this month.

Earlier this year we announced that Amazon was teaming up with developer education company Big Nerd Ranch to deliver immersive, free training for the Alexa Skills Kit (ASK). The training shows you how to develop Alexa skills locally with Node.js, from setting up your development environment to submitting a skill for certification and more complex ASK features like account linking and persistence. You can find a recap of all the blog posts published for the training series here.

Today we are excited to release the first two videos in the Big Nerd Ranch video series. These videos kick off the official Alexa Developers channel on YouTube.

In the first video, “Hello, Alexa!”, we’ll introduce the Alexa Skills Kit and teach you how to create Alexa skills, or capabilities, for Alexa. We will build and deploy a basic skill. This skill will be called the “Greeter” skill, and will say hello to users when they invoke the skill using the words that we specify.

In the second video, “Slots and Slot Types”, we will see several new features of the skill interaction model that let us build more sophisticated skills. We will expand on what we learned with the Greeter skill by building a more feature-rich skill called “Airport Info”. Airport Info will make requests to the Federal Aviation Administration’s JSON backed web service, and inform users if there is any delay at an airport that they specify.

Earlier this year, we announced that Amazon was teaming up with developer education company Big Nerd Ranch to deliver immersive, free training for the Alexa Skills Kit. The training shows you how to build Alexa skills from start to finish, from setting up your dev environment to certification and more complex skill interactions like account linking. Here's a recap of the six-part blog training series.

Setting Up Your Local Environment(part 1 of 6): This post will guide you through setting up a local development environment so that you can work more efficiently, enabling you to rapidly test your Alexa skills as you develop them. We will first set up a working environment with Node.js, and then we will build a model for our Alexa skill, Airport Info. We will use Chai and Mocha, two JavaScript assertion and test libraries to build our tests.

Implementing an Intent with Alexa-app and Alexa-app-server(part 2 of 6): In this second post, we’ll be using alexa-app as a framework to build our Alexa skill and alexa-app-server will allow us to test interacting with the skill locally. We will be using these libraries because they grant a path to supporting a local development and testing workflow with an Alexa skill, which allows us to rapidly test and develop.

Editor’s note: This is part six of the Big Nerd Ranch series. Check out partsfive, four,three,two, andone.

One of the greatest features of Alexa is that it functions as a personal assistant you can interact with without having to physically touch the device. This allows you to get information or accomplish tasks while you are, for example, baking a cake. One of the tasks you could accomplish in such a sticky situation could be to post a tweet about your baking adventures.

From an Alexa developer’s point of view, the task of posting a tweet is a pretty sophisticated operation because the skill needs to authenticate with the user’s Twitter account on the web, then get authorization to access the API in order to make a posting.

From a convenience and security point of view, it would be a terrible idea for the skill to ask for the user’s credentials verbally every time access to the Twitter API is needed. Furthermore, an Alexa-enabled device does not have a way to store these credentials locally, so another approach must be used.

Fortunately, the Alexa Skills Kit features account linking, which lets you access user accounts on other services, Twitter among them, using the OAuth protocol. In this post, we will use account linking and OAuth to grant delegated authority to our Airport Info skill so that it can post an airport’s flight status to a user’s Twitter account. Delegated authority means that the Airport Info skill will be granted permission to post to the user’s Twitter account without ever having access to the actual account credentials.

Note that Alexa uses the OAuth 2.0 protocol, and some services like Twitter still use version 1.0. The differences in the implementation are not great. Essentially, dealing with OAuth 1.0 requires an additional token request step that will be handled in this exercise by a separate web application.

Registering Airport Info as a Twitter App

If you haven’t already built an Alexa Skill, check out our previous posts on building Airport Info to get started.

The first step in enabling Twitter delegated authority to the Airport Info skill is to let Twitter know that the skill exists. We must register Airport Info as a Twitter App, so that Twitter knows the skill will later ask for authorization to post on a user’s behalf. To accomplish this, first log in to your Twitter account and visit the Twitter Apps page.

Editor’s note: This is part five of the Big Nerd Ranch series. Check out parts four, three, two, and one.

If you are reading this post, it is likely that you have finished writing a shiny new Alexa skill and you are ready to submit it to Amazon for review and publication. In this post, we’ll guide you through the submission process and help you get your skill published as quickly as possible.

Haven’t written your skill yet? Read on to learn about Amazon’s guidelines so that you can have a rapid and successful skill review.

What to Keep in Mind When Designing and Submitting an Alexa Skill for Review

If you want to have your own skill available to Alexa users, you will need to submit your skill to the Alexa Team for certification.

As you might expect, skills with obscene, offensive or illegal content or purposes are terminally frowned upon. What you might not expect is that the content policies do not allow skills targeted to children, as they may compromise a child’s online safety. This is a less evident restriction you should consider when a new skill idea hits you.

Security for the server-side part of your skill is also an important consideration, and it may be tricky if you decide to host the skill yourself outside of AWS Lambda. In that case, your server will need to comply with Amazon’s security requirements. As an example, any certificates for your skill service need to be issued by an Amazon-approved certificate authority.

The good news is that if you host your skill services as Amazon Web Services Lambda functions as we have done in the Developing Alexa Skills blog series, all major security requirements are automatically satisfied.

We'll go over how to write Alexa skill data to storage, which is useful in cases where the skill would time out or when the interaction cycle is complete. You can see this at work in skills like the 7-Minute Workout skill, which allows users to keep track of and resume existing workouts, or when users want to resume a previous game in The Wayne Investigation.

What's Next to Deploy an Alexa Skill

To deploy our Alexa skill to the staging environment, we first need to register the skill with the skill interface, then configure the skill interface's interaction model. We'll also need to configure an AWS Lambda instance that will run the skill service we developed locally.

The Alexa skill interface is what’s responsible for resolving utterances (words a user spoke) to intents (events our skill service receives) so that Alexa can correctly respond to what a user has asked. For example, when we ask our Airport Info skill to give status information for the airport code of Atlanta, Georgia (ATL), the skill interface determines that the AirportInfo intent matches the words that were spoken aloud, and that ATL is the airport code a user would like information about.

Here's what the journey from a user's spoken words to Alexa's response looks like:

In our post on implementing Alexa intents, we simulated the skill interface with alexa-app-server so that we could test our skill locally. We sent a mock event to the skill service from alexa-app-server by selecting IntentRequest with an intent value of airportInfo and an AIRPORTCODE of ATL in the Alexa Tester interface.

By comparison, in a deployed skill, the skill interface lives on Amazon's servers and works with users’ utterances that are sent from Alexa to the skill service.

We will be using these libraries because they grant a path to supporting a local development and testing workflow with an Alexa skill, which allows us to rapidly test and develop. (H/T matt-kruse!).

Setting up Alexa-app-server

The source code for this project is available on GitHub. To begin, pull down the alexa-app-server GitHub repo with the following command:

git clone https://github.com/matt-kruse/alexa-app-server.git

Once you have cloned the repository, install any required dependencies by running:

npm install

Move the `faa-info` folder you created in the previous post (or via Github here) into the alexa-app-server repository’s `./examples/apps` directory and create a new `index.js file` in the `faa-info` directory. This is where we’ll implement our skill using the alexa-app Node module we installed just above.

Within the repository, change to the examples directory and run:

node server

You should see:

Loading apps from: apps
Listening on HTTP port 8080

You should now have a running local “skill server,” which gives us a way to test interaction with our skill locally as we build it.

This is part one of the Big Nerd Ranch series. Read about our free developer training for Alexa Skills Kit here.

If you want to build Alexa Skills, where should you start? You could begin with building one of the sample skills like the color picker or the trivia game. But when you’ve already tackled “Hello, World,” you’re ready to dive in.

Not quite yet. First, let’s set up a local development environment. Why should you use a local development environment over testing on a live server? There are many benefits. Chief among them are the fact that you gain access to the debugger and the stack trace, and you can quickly test changes without uploading files to a remote server, cutting down your iteration time.

In addition to time considerations, there are other concerns: what if the network is running slowly, you’re on a plane, or the Wi-Fi isn’t working? With a local dev environment, you can still get work done.

That’s where this post comes in: it will guide you through setting up a local development environment so that you can work more efficiently, enabling you to rapidly test your skills as you develop them. We will first set up a working environment with Node.js, and then we will build a model for our Alexa Skill. This skill—Airport Info—will track airport flight delays and weather conditions, and will give us a chance to try developing a more complex Alexa Skill locally.