Home

Awesome

Alexa Morse-Coder Skill

This skill is both - a fun skill with lots of features for the Morse-Coder community as well as reference implementation for Alexa Tellask SDK and Alexa States SDK.

User features

Technical solution

The skill relies on several AWS cloud services. #####AWS Lambda A Lambda function handles all incoming speechlet requests. It also receives the locale on each request so it returns speech in the corresponding language. #####AWS DynamoDB This NoSQL database stores information about settings and score of all users. To optimize performance the Lambda function caches static information in the Alexa session which persists throughout a single user session. All information which is persisted either permanently or temporarily is referred to as state. Alexa States SDK makes it easy to hold this state in Java POJOs and manages their state with _AlexaStateHandler_s which hide most of the complexity on reading/writing to/from data stores like DynamoDB or S3. In this case AWSDynamoStateHandler is leveraged to manage permanent state in a DynamoDB table. #####AWS EC2 This skill also relies on a Spring Boot Java application which is accessed by the Lambda function through a REST over HTTP interface. EC2 is the virtual instance this application is hosted. The REST-API takes an exercise word and generates the Morse-code on-the-fly. The result is an MP3-file it stores in an S3 bucket and two images (the letter cards for the Alexa app). The URLs of those files is returned to the Lambda function. #####AWS IoT If the user enabled the device integration feature this skill creates a user-specific thing shadow in AWS IoT. By updating the shadow state with the encoding information of an ongoing exercise, an MQTT message is propagated to a topic IoT devices are subscribed to.