Last active
November 25, 2020 16:08
-
-
Save arunjeetsingh/d5d5ac2856cb3d22a404acb846fe8a11 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
"directives": [ | |
{ | |
"type": "Alexa.Presentation.APL.RenderDocument", | |
"document": { | |
"type": "APL", | |
"version": "1.5", | |
"import": [ | |
{ | |
"name": "AnimationPackage", | |
"source": "https://aruntalkstech.s3.amazonaws.com/EchoShow10Demo/AnimationPackage.json", | |
"version": "1.0.0" | |
} | |
], | |
"extensions": [ | |
{ | |
"name": "SmartMotion", | |
"uri": "alexaext:smartmotion:10" | |
} | |
], | |
"mainTemplate": { | |
"parameters": [ | |
"animationData" | |
], | |
"items": [ | |
{ | |
"type": "Container", | |
"width": "100%", | |
"height": "100%", | |
"items": [ | |
{ | |
"type": "Image", | |
"source": "https://aruntalkstech.s3.amazonaws.com/EchoShow10Demo/starscity.jpg", | |
"position": "absolute", | |
"width": "100%", | |
"height": "100%", | |
"scale": "best-fill" | |
}, | |
{ | |
"type": "VectorGraphic", | |
"source": "${animationData.properties.name}", | |
"width": "100%", | |
"height": "100%", | |
"scale": "best-fit", | |
"align": "center", | |
"frame": "${(elapsedTime*0.06)%120}", | |
"speech": "${animationData.properties.MerryChristmasAudio.url}", | |
"onMount": [ | |
{ | |
"type": "Parallel", | |
"commands": [ | |
{ | |
"type": "Sequential", | |
"commands": [ | |
{ | |
"type": "SetValue", | |
"componentId": "DebugText", | |
"property": "text", | |
"value": "Debug: Starting SpeakItem" | |
}, | |
{ | |
"type": "SpeakItem" | |
}, | |
{ | |
"type": "SetValue", | |
"componentId": "DebugText", | |
"property": "text", | |
"value": "Debug: Ending SpeakItem" | |
} | |
] | |
}, | |
{ | |
"when": "${environment.extension.SmartMotion}", | |
"type": "Sequential", | |
"repeatCount": 3, | |
"commands": [ | |
{ | |
"type": "SmartMotion:PlayNamedChoreo", | |
"delay": 500, | |
"name": "ScreenImpactCenter" | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"type": "Container", | |
"position": "absolute", | |
"display": "none", | |
"items": [ | |
{ | |
"type": "Text", | |
"id": "DebugText", | |
"text": "Debug: " | |
}, | |
{ | |
"type": "Text", | |
"id": "MotionText", | |
"text": "Motion: " | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
}, | |
"sources": { | |
"MerryChristmasAudioDocument": { | |
"type": "APLA", | |
"version": "0.8", | |
"description": "This document demonstrates key components used to create audio responses.", | |
"mainTemplate": { | |
"item": { | |
"type": "Mixer", | |
"description": "The Mixer component plays a set of audio clips at the same time. See docs for more information.", | |
"items": [ | |
{ | |
"type": "Sequencer", | |
"items": [ | |
{ | |
"type": "Silence", | |
"duration": 1500 | |
}, | |
{ | |
"type": "Speech", | |
"contentType": "SSML", | |
"content": "<speak><amazon:emotion name=\"excited\" intensity=\"low\">Ho<break strength=\"weak\"/>Ho<break strength=\"weak\"/>Ho<break strength=\"strong\"/>Merry Christmas!</amazon:emotion></speak>" | |
} | |
] | |
}, | |
{ | |
"type": "Audio", | |
"description": "The Audio component plays the provided audio file, such as an MP3 file. See docs for more information.", | |
"source": "https://aruntalkstech.s3.amazonaws.com/EchoShow10Demo/sleighbells.wav" | |
} | |
] | |
} | |
} | |
} | |
}, | |
"datasources": { | |
"animationData": { | |
"type": "object", | |
"properties": { | |
"name": "Santa" | |
}, | |
"transformers": [ | |
{ | |
"template": "MerryChristmasAudioDocument", | |
"outputName": "MerryChristmasAudio", | |
"transformer": "aplAudioToSpeech" | |
} | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment