Giter Site home page Giter Site logo

skill-sample-nodejs-quiz-game's Introduction

Build An Alexa Quiz Game Skill πŸ‡ΊπŸ‡Έ

This Alexa sample skill is a template for a basic quiz game skill. Provided a list of interesting facts about a topic, Alexa will quiz a user with facts from the list.

You can see an example of this skill in action - just enable the United States Quiz from the Alexa app.

Skill Architecture

Each skill consists of two basic parts, a front end and a back end. The front end is the voice interface, or VUI. The voice interface is configured through the voice interaction model. The back end is where the logic of your skill resides.

Three Options for Skill Setup

There are a number of different ways for you to setup your skill, depending on your experience and what tools you have available.


Additional Resources

Community

Tutorials & Guides

  • Voice Design Guide - A great resource for learning conversational and voice user interface design.
  • Codecademy: Learn Alexa - Learn how to build an Alexa Skill from within your browser with this beginner friendly tutorial on Codecademy!
  • Situation Design for Quiz Skill - step through the design of the quiz skill, and how it handles different situations. Apply it to your skill too! Also available in PDF.

Documentation

skill-sample-nodejs-quiz-game's People

Contributors

ajot avatar akersh-s avatar aszk avatar bcbcb avatar breedloj avatar codesue avatar ebachmeier avatar franklin-lobb avatar hyandell avatar jakemkelly avatar jeffblankenburg avatar jesposito avatar jpeddicord avatar kunalhsatoz avatar letmypeoplecode avatar maju6406 avatar paulcutsinger avatar reaganmcf avatar robm26 avatar sleepydeveloper avatar ynishi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skill-sample-nodejs-quiz-game's Issues

"Lambda" page, step 6

Please indicate that triggers are on a separate tab, and once there, you must click "add trigger".

"ask deploy" source directory is invalid

When attempting to deploy this skill, most of the deployment completes as expected:

ask deploy
-------------------- Update Skill Project --------------------
Skill Id: amzn1.ask.skill.e04ea7be-cc76-4606-9592-a6927b78c72e
Skill deployment finished.
Model deployment finished.
Source directory is invalid, cannot install node_module for the lambda function(s)

That final one is causing issues. On my local machine, in skill.json there is line 46:

"sourceDir": "lambda/src"

changing this to:

"sourceDir": "lambda"

now effectively succeeds in deployment.

ask deploy
-------------------- Update Skill Project --------------------
Skill Id: amzn1.ask.skill.e04ea7be-cc76-4606-9592-a6927b78c72e
Skill deployment finished.
Model deployment finished.
Lambda deployment finished.

all wrong answers

Dear Team,
First of all, thank you for the tutorial and the detailed step to use the code as is:
the issue, I encountered is that, even I tell the correct answer, it says "that answer is wrong" but gives the same answer as correct answer. I don't know, how to modify the code.
can you please help.
with regards
Riphath Athyala

Mismatch in instructions between VUI step and Lambda step

The instructions in this repo tell the user to create a quiz game (for example, for US states by using https://github.com/alexa/skill-sample-nodejs-quiz-game/blob/master/models/en-US.json) but in the Lambda step, the user is told to use a Serverless Application Repository (alexa-skills-kit-nodejs-factskill) that instead provides facts about planets. I thought the intention was to replicate the "United States Quiz" as it says here: https://github.com/alexa/skill-sample-nodejs-quiz-game .

Instruction's 'Interaction Model' link is invalid

In the instruction's 1-voice-user-interface.md,
Step 1 (Voice User Interface) tab > step 7.ii > 'Interaction Model' link is invalid

I presume the link would point to the code in InteractionModel.js.

Image

Hey!! Can anyone help me with adding images in my Alexa skill responses. I am quiet confused with adding images to my skill

Thanks in advance

Few warnings

Hello all,

In index.js

Line 54 return "The " + formatCasing(property) + " of " + item.StateName + " is <say-as interpret-as='spell-out'>" + item[property] + "</say-as>. "
and
Line 57 return "The " + formatCasing(property) + " of " + item.StateName + " is " + item[property] + ". "
are missing a semicolon at the end.

Also since return is being performed on 54 and 57, 55 and 58's break is unreachable I believe.

Line 294 let property = this.attributes["quizproperty"] is also missing a semicolon at the end.

Line 176 const counter = 0;
Line 374 'function getRandomSymbolSpeech(symbol)'
Line 404 let speechCon = "";
These all three are defined but never used within the js.
Is this intended?

Two of the mentioned Setup Files are missing

In the README.md

there are three possibilities mentioned to setup an alexa skill. The second two are missing in the code:

(./instructions/setup-vui-aws-hosted.md).
(./instructions/cli.md).

"The remote endpoint could not be called, or the response it returned was invalid,"

Hi, I'm having trouble with this error. I've looked on github, stackoverflow, and other cites and can't figure it out. I ran an execution test and it came back successful, but whenever I try to test it in the developer portal I continue to get the "The remote endpoint could not be called, or the response it returned was invalid," error. Could someone please advise me to what I should do to fix it? Thank you in advance!

There was a problem with the requested skill's response

I am trying to complete this example. I can't get past the first audio statement using the simulator. It seems to be hanging before the reprompt, since I hear "Welcome to the United States Quiz Game!... " portion.

No matter what I submit, I can't get past this point.

{
"body": {
"version": "1.0",
"response": {
"outputSpeech": {
"type": "SSML",
"ssml": " Welcome to the United States Quiz Game! You can ask me about any of the fifty states and their capitals, or you can ask me to start a quiz. What would you like to do? "
},
"reprompt": {
"outputSpeech": {
"type": "SSML",
"ssml": " I know lots of things about the United States. You can ask me about a state or a capital, and I'll tell you what I know. You can also test your knowledge by asking me to start a quiz. What would you like to do? "
}
},
"shouldEndSession": false
},
"sessionAttributes": {
"STATE": "_START"
},
"userAgent": "ask-nodejs/1.0.25 Node/v6.10.3"
}
}

How to use the i18next t() function outside of handler functions?

If I want to use the i18next t() function outside of a handler in one of the helper functions what is the best way to achieve that?

e.g:
I register language strings in the alexa object like so:

exports.handler = (event, context) => {
  const alexa = Alexa.handler(event, context);
  alexa.appId = APP_ID;

  alexa.resources = languageStrings; // Add some language strings here.

  alexa.registerHandlers(handlers, startHandlers, quizHandlers);
  alexa.execute();
};

But in getSpeachDescription I have no access to this.t(). What is the recommended way to use the language strings there?
see:
https://github.com/alexa/skill-sample-nodejs-quiz-game/blob/bfbcbfe092fa2ff10f5bdcd8eeff66902ac1a027/lambda/custom/index.js#L14

  • Init my own i18next object with the same resources?
  • Use a .call statement like getSpeachDescription.call(this);
  • Use the alexa object inside the helper function?
  • Other / better method?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.