This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error":"false", | |
"state":"play", | |
"plugin": { | |
"bandwidth":"22483196 bps", | |
"id":"22297", | |
"name":"Spotify Music" | |
}, | |
"format": { | |
"audio":"pcm", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This sample demonstrates handling intents from an Alexa skill using the Alexa Skills Kit SDK (v2). | |
// Please visit https://alexa.design/cookbook for additional examples on implementing slots, dialog management, | |
// session persistence, api calls, and more. | |
const Alexa = require('ask-sdk-core'); | |
const persistenceAdapter = require('ask-sdk-s3-persistence-adapter'); | |
const launchDocument = require('./documents/launchDocument.json'); | |
const birthdayDocument = require("./documents/birthdayDocument.json"); | |
const util = require('./util'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"envelopeVersion": "20160207", | |
"capabilities": [ | |
{ | |
"type": "AlexaInterface", | |
"interface": "Alerts", | |
"version": "1.3" | |
}, | |
{ | |
"type": "AlexaInterface", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"streamURL": null, | |
"raw": { | |
"messageBody": { | |
"directives": [ | |
{ | |
"namespace": "SpeechRecognizer", | |
"payload": {}, | |
"name": "StopCapture" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const virtualAlexa = require("virtual-alexa"); | |
const expect = require("expect"); | |
const TEST_COUNT = 100; // The number of tests to run in total | |
const TEST_CONCURRENCY = 20; // The number of test to run concurrently | |
const TEST_OFFSET = 10; // Milliseconds to offset starting each test | |
const TEST_START = Date.now(); // The start time for the tests as a whole | |
let concurrentCalls = TEST_CONCURRENCY; | |
let calls = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
configuration: | |
locale: en-US | |
--- | |
- Test: "Test launch request" # Optional info about the test | |
- LaunchRequest: # LaunchRequest is "reserved" - it is interpreted not as an utterance but as a LaunchRequest | |
- response.outputSpeech.ssml =~ "Here's your fact: *" | |
- response.card.title =~ "Space Facts" | |
- repsonse.card.content =~ "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plays a particular track, from specific offset | |
* @param audioURL The URL to play | |
* @param offsetInMilliseconds The point from which to play - we set this to something other than zero when resuming | |
*/ | |
SimplePlayer.prototype.play = function (audioURL, offsetInMilliseconds) { | |
var response = { | |
version: "1.0", | |
response: { | |
shouldEndSession: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
node: | |
version: 6.9.2 | |
dependencies: | |
pre: | |
- npm install -g ask-cli | |
test: | |
override: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("Runs through game with two players", async () => { | |
const virtualDevice = new vds.VirtualDevice(process.env.VIRTUAL_DEVICE_TOKEN); | |
await virtualDevice.message("alexa exit"); | |
let result = await virtualDevice.message("open guess the price"); | |
assert.include(result.transcript, "welcome to guess the price how many persons are playing today"); | |
result = await virtualDevice.message("two"); | |
console.log("Result: " + result.transcript); | |
assert.include(result.transcript, "what is your name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.followUpState('DescriptionState') | |
.showImageCard(response.name, description, response.sprites.front_default) | |
.ask(speech, reprompt); |
NewerOlder