0

I'm writing an Alexa Skill via the online Alexa Developer Console with the alexa-hosted provisioning. I am using python to code the skill.

I've gotten everything working speech-wise, but I'm trying to use the APLT interface to display text on an Echo Dot with Clock. There seems to be very little online about how to get this working with the alexa-hosted skill and I cannot seem to get it working.

I've been trying all day and starting to get annoyed at how hard it is to simply show some text!

I'm sorry if this is an easy question, I'm very new to alexa skills! Any help would be greatly appreciated.

  • have you tried things described here in the doc: https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/use-apl-with-ask-sdk.html ? – slawciu Jun 18 '20 at 12:53

1 Answers1

0

This is the type of JSON you need to return: Design your APL document here - APL design. Everything is drag and drop in this. Keep trying and you will get it. When you are done you can download the JSON file from the top right corner on the page. The JSON file has document and datasources. Pass them in the directives below.

{
    "directives": [
        {
          "type": "Alexa.Presentation.APL.RenderDocument",
          "datasources": aplDataSource,
          "document": aplDocument,
          "token": "randomToken"
        },
        {
                "type": "AudioPlayer.Stop"
        }
    ],
    'outputSpeech': {
        'type': 'SSML',
        'ssml': '<speak>' + speechOutput + '</speak>'
    },
    'card': {
        'type': 'Simple',
        'title':  cardTitle,
        'content':  cardContent
    },
    'reprompt': {
        'outputSpeech': {
            'type': 'SSML',
            'ssml': '<speak>' + repromptText + '</speak>'
        }
    },
    'shouldEndSession': shouldEndSession
}
Ashish Yadav
  • 154
  • 3
  • Thanks! I've gone ahead and made the json file and dragged it into the files area for the skill. Do you know how I'd go about calling it from the Python code of the skill? – Harry Smith Jun 21 '20 at 18:33