Alexa Skill ToolBox

What is ToolBox? (für deutsche Version hier klicken)

ToolBox is a voice driven command line interface which gives Alexa skill developers access to useful data and information.

Optional feature: Alexa skill developers can use ToolBox to ask for metrics / usage information regarding their productive skills. This requires account linking the skill to your developer account. This step is optional. Other features of this skill can be used without account linking.

Availability and perspective

More and more features will be added to the skill soon.

Suggestions and feedback are welcome! (frank.boerncke@gmail.com)

Basic Voice commands

On screen based devices the user interface resembles a classical command line interface so that a command input/output history is saved (even between mutliple skill sessions). The user may navigate within the history buffer. This is useful in case the user wants to compare results with older output from past requests.

  • Start the skill:

    "Alexa, open ToolBox"

    Isn’t this a nice launch phrase?

  • Ask for a command list:

    "Alexa, Help"
  • Ask for current APL version support:

    "Alexa, show APL version"

    As time of writing this the latest version is “1.6”.

    Please note: to update your device to the latest APL version it is not enough to run the system update offerred within the Ssettings menu of your Alexa device. APL updates run automatically, when the devices is untouched for a while. As a rule of thumb leave your device plugged in over night and you should have received an update then the next day.

  • Ask for viewport properties (screen resolution, supported video codecs, dpi, shape, canRotate etc.) of your current device:

    "Alexa, show viewport properties"

    No need to look up the resolution of your device anymore. Simply ask it!

  • Request device ID:

    "Alexa, show device id"

    For more information regarding the internal device id see: https://developer.amazon.com/en-US/docs/alexa/custom-skills/device-address-api.html#get-the-api-access-token-and-device-id

  • Ask for environment parameters:

    "Alexa, show environment parameters"

    You will see the output of variables defined within the context of “process.env“. Please note this shows the context of the skill and not of your device. But the information presented here may give you an idea if there are options which you can use within your own skills.

Make Alexa say something specific

Let Alexa repeat an utterance:

"Alexa, repeat 'Do it again Sam'"

Using the slot type AMAZON.SearchQuery this will catch your utterance and give it back to you.

Regarding AMAZON.SearchQuery: this slot type can only capture up to 8 seconds of audio. The maximum number of characters recognized is 110. If you exceed any of these boundaries you will receive a reprompt - this will not happen immediately though: Alexa will keep capturing audio until the user is done.

Experiment with slot types and utterances

A number of commands within ToolBox allow dialogue based behaviour testing of selected AMAZON slot types. The returned strings are shown on the console and you will see that often what you say is not quite what you get …

  • Slot Type AMAZON.SearchQuery

    "Alexa, test slot type AMAZON Search Query"  (try for example '20 degrees Celsius')

    ‘20 degrees Celsius’ ==> ‘20°C’

  • Slot Type AMAZON.DATE

    "Alexa, test slot type AMAZON Date"  (try for example 'yesterday')

    ‘yesterday’ ==> ‘2021-04-08’ (or something similar)

  • Slot Type AMAZON.TIME

    "Alexa, test slot type AMAZON Time"  (try for example 'noon')

    ‘noon’ ==> ‘12:00’

  • Slot Type AMAZON.DURATION

    "Alexa, test slot type AMAZON Duration"  (try for example 'eight hours')

    ‘eight hours’ ==> ‘PT8H’

  • Slot Type AMAZON.FirstName (List Slot Type)

    "Alexa, test slot type AMAZON First Name"  (try for example 'Eve')

    ‘Eve’ ==> ‘Yves’

  • Slot Type AMAZON.Food (List Slot Type)

    "Alexa, test slot type AMAZON Food"  (try for example 'sausages')

    ‘sausages’ ==> ‘sausage’

If you want to rerun a test a second time then there is a simple option:

"Alexa, repeat / do this again"

Use APL templates from third party developers as plugins

A lot of APL templates work fine as a standalone solution but even then they still need a skill environment to launch on a real world device. Using the technique described as follows the skill ToolBox offers a list of preregistered useful APL skill templates which can then be loaded by voice command.

  • List available Plugins:

    "Alexa, list available plugins"

    You will see a list of supported plugins including their “launch name“. A short content description will help you to select an appropriate plugin for your purposes and some author information gives credit to those who did the original work.

  • Load and execute a specific plugin:

    "Alexa, load plugin 'Pixel Tester'"

    This will load and start the plugin. You will be asked twice for what to do next. If you want to return to the “ToolBox” environment simply say something like “back” or “help” (more about this later). Otherwise you may continue to use the loaded plugin for whatever it is designed for.

Available plugins

Only a few templates have been registered so far within ToolBox but expect more to come soon. So far we have:

  • APL Analyzer - (by Alexander Martin) shows device specific APL properties. For more information about the APL Analyzer click here.

    APL Analyzer Screenshot

  • APL Doctor - Show device specific viewport properties. This functionality is also available as a stand alone skill “Apl Doctor”.

    APL Doctor Screenshot

  • Color Picker - (by Alexander Martin & Frank Börncke) shows a color palette where you can see the hex code for a selected color.

    Color Picker Screenshot

  • Display Test - Show a test image which may be useful to adjust colors or contrast

    Display Test Screenshot

  • Moorhuhn - (by Alexander Martin) shows that it is possible to build games like “Moorhuhn“ with APL technology.

    Moorhuhn Game Screenshot

  • Pixel Tester - Switching backkground colors will help to check your screen for broken pixels (remember this also works on Fire TV!)

    Pixel Tester Screenshot

  • Pong - (by Alexander Martin) implements the Retro-Game “Pong“ using APL-Vector graphics. Developers need a break from time to time.

    Pong Game Screenshot

  • Voice View - Activate VoiceView in your device settings to learn about accessibility features of your device

    Voice View Screenshot

If you have suggestions for more useful APL templates that are somehow related to Alexa Skill development then do not hesitate to send me a note.

Test your Audio

Depending on your setup you may use your Echo device(s) with inbuilt speakers, external speakers, headsets with or without bluetooth. How about your Fire TV? If you want to check the audio quality then ToolBox offers you a number of options:

  • Test your stereo setup by playing sound only on the left channel (10 seconds, may appear loud):

    "Alexa, play sound **left channel**"
  • Test your stereo setup by playing sound only on the right channel (10 seconds, may appear loud):

    "Alexa, play sound **right channel**"
  • Test your stereo setup by playing sound on both channels (10 seconds, may appear loud):

    "Alexa, play sound **both channels**"
  • Run a frequency test. You can listen to a tone ranging from 20 to 18000 Hertz. This will take 15 seconds and I bet that you will not hear anything for the last seconds 🙂

    "Alexa, play sound frequency test"
  • Play pink noise for 10 seconds:

    "Alexa, play sound pink noise"
  • Play white noise for 10 seconds:

    "Alexa, play sound white noise"
  • Play Brownian noise (also known as Brown or red noise) for 10 seconds:

    "Alexa, play sound Brownian noise"

If you want to rerun a test a second time then there is a simple option:

"Alexa, repeat / do this again"

Access metrics information for your production skills (optional)

For my own workflow I found that the feature described here is a big time saver compared to doing the same within the browser. This is why I make it public as an optional feature: you can choose to link ToolBox to your skill developer account. When you decide to do so you will have additional functionality and find out about basic metric numbers for your productive skills.

  • List your production skills:

    "Alexa, show my skills"

    You will see a list with all your skills running in production. Skills updated latest will be shown close to the command line. Older skills may turn out to ‘appear’ on a previous screen in case you have a lot of skills running.

    Every skill has its own number assigned to it. This number is the key for the following commands:

  • Show access information about a specific skill for today:

    "Alexa, skill number 1 for today"
  • Show access information about a specific skill for yesterday:

    "Alexa, skill number 1 for yesterday"
  • Show access information about a specific skill for yesterday: (‘yesterday’ is default):

    "Alexa, skill number 1"
  • Show access information about a specific skill for last week:

    "Alexa, skill number 1 for last week"

Please note that working with the Alexa skills metrics API comes with a number of limitations:

  • The API may refuse to return a result for no apparent reason (too high server load?) and work again seconds or minutes later.

  • The API does not like to many requests in short time frames. In case you run into such a situation simply wait and try again later.

  • Certainly I would like to add more metric request (“show for last month“, “show for last year“ etc.) but the API simply doesn’t allow this in the current version.

  • I have the code ready for asking Alexa things like “What is my best running skill for today/yesterday“ etc. but this requires so many single API requests in a row that the API doesn’t respond reliable anymore.

    This may change in the future. If this happens I am prepared to offer more features to the skill.

If you read until here then for sure you found out that the ToolBox UI offers kind of a command line interface. For decades now this UI pattern has proven to be a productivity booster.

Within the concept of a command shell we naturally expect some concepts to work which ToolBox makes available via voice:

  • The user may navigate throughout the history buffer to see older or newer results:

    "Alexa, page up"
    "Alexa, control P"
    
    "Alexa, page down"
    "Alexa, control N"

Persistent buffer handling

The intended default behaviour for the shell is to save past commands and output for the next session. This may be useful if you want to compare usage numbers with results from other days. To make this easier, every command line contains a time stamp.

If you want to delete the buffer though you can do so any time using the “reset“ command.

  • Delete history buffer:

    "Alexa, reset"
    "Alexa, control L"

The history will never save more than 1000 lines. Older information is deleted automatically.

Adjusting font sizes

Depending on if you work on a Fire TV or a small Echo Spot display you may want to adjust the font size of the terminal.

  • Increase font size:

    "Alexa, increase font size"
    "Alexa, control plus"
  • Decrease font size:

    "Alexa, decrease font size"
    "Alexa, control minus"

Responsive Layout: APL is used to adjust font size and content dynamically according to the screen dimensions of the device being used. Changing the font size will result in more or less information being shown on the screen. But as the history is saved within a buffer you will not loose any information by playing around with fonts.

Support of AMAZON.RepeatIntent

For a lot of commands it may be useful to execute them multiple times in a row:

  • Slot Type testing
  • Sound / Audio testing
  • Increase / decrease font size
  • Paging up / down in history

Simply say something like “Do this again“ or “repeat!“ to make a command execute another time. If you get used to it it will feel quite natural.

Switching layout schemes

Currently two different layout schemes are available for the shell, a “modern“ and a “classic“ one (different colors, fonts and cursor symbols). You can switch between the options by voice command:

"Alexa, switch layout"

Expect more layout variants to come in the future.

Using ToolBox on devices without a screen

ToolBox is intended to be used on a screen based device (including a Fire TV) but it does its best to also work on headless device like Echo DOT where it makes sense.

Skill store

Find and activate ToolBox from your local Skill Store:

To start ToolBox on your device you can also use this QuickLink.

Finally

ToolBox does its best to bring the concepts of a command shell and voice together. In the way in which this idea was implemented, however, it is also an experiment. If you have any ideas on how to continue and what features are still missing, please let me know.