All Projects → phxql → aleksa

phxql / aleksa

Licence: LGPL-3.0 license
Aleksa is a small framework for writing Alexa Skills in Kotlin

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to aleksa

Alexa Skills Dotnet
An Amazon Alexa Skills SDK for .NET
Stars: ✭ 412 (+1013.51%)
Mutual labels:  alexa, skills
Alexa Skills Kit Sdk For Python
The Alexa Skills Kit SDK for Python helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Stars: ✭ 678 (+1732.43%)
Mutual labels:  alexa, skills
alexa-conversation
Framework to easily test your Alexa skills functionally by creating a conversation with your skill.
Stars: ✭ 51 (+37.84%)
Mutual labels:  alexa, skills
mapbox-assistant-example
Examples of Amazon Echo, Google Home, and other bots interacting with Mapbox services.
Stars: ✭ 15 (-59.46%)
Mutual labels:  alexa, echo
Chatskills
Run and debug Alexa skills on the command-line. Create bots. Run them in Slack. Run them anywhere!
Stars: ✭ 171 (+362.16%)
Mutual labels:  alexa, echo
Alexa-skills-starters
💻 A collection of super cool Amazon Alexa skills for complete newbies. 💻
Stars: ✭ 24 (-35.14%)
Mutual labels:  alexa, skills
Alexa Smarthome
Resources for Alexa Smart Home developers.
Stars: ✭ 496 (+1240.54%)
Mutual labels:  alexa, skills
Alexa Skills Kit Sdk For Java
The Alexa Skills Kit SDK for Java helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Stars: ✭ 758 (+1948.65%)
Mutual labels:  alexa, skills
Flask Ask
Alexa Skills Kit for Python
Stars: ✭ 1,877 (+4972.97%)
Mutual labels:  alexa, echo
Amazon Alexa Php
Php library for amazon echo (alexa) skill development.
Stars: ✭ 93 (+151.35%)
Mutual labels:  alexa, echo
alexa template
A template and tutorial for building an Alexa Skill written in Python focused on readability.
Stars: ✭ 44 (+18.92%)
Mutual labels:  alexa, echo
Bst
🔧 Bespoken Tools - Tools for making voice apps faster and better
Stars: ✭ 193 (+421.62%)
Mutual labels:  alexa, echo
alexa-spotify-connect
Control Spotify Connect devices with Alexa
Stars: ✭ 92 (+148.65%)
Mutual labels:  alexa, echo
serverless-alexa-skills
Manage your Alexa Skills with Serverless Framework
Stars: ✭ 69 (+86.49%)
Mutual labels:  alexa
cookiecutter-flask-ask
Cookiecutter template for Alexa skills based on the fantastic Flask-Ask framework 🍾🗣❓
Stars: ✭ 51 (+37.84%)
Mutual labels:  alexa
HuntTheYetiAlexa
Play the game Hunt the Yeti on the Amazon Echo
Stars: ✭ 17 (-54.05%)
Mutual labels:  alexa
SmartThings-VirtualThermostat-WithDTH
Virtual Thermostat Device with Device Type Hander to create a proper thermostat device (Works With Google Home and Alexa)
Stars: ✭ 33 (-10.81%)
Mutual labels:  alexa
tqrespec
TQRespec - The respec tool for Titan Quest game
Stars: ✭ 59 (+59.46%)
Mutual labels:  skills
Azure4Alexa
Create and Host Alexa Custom Skills using .NET and Azure
Stars: ✭ 48 (+29.73%)
Mutual labels:  alexa
alexa-skill-test-framework
Framework for easy offline black-box testing of Alexa skills.
Stars: ✭ 64 (+72.97%)
Mutual labels:  alexa

Aleksa

Aleksa is a small framework for writing Alexa Skills in Kotlin.

Warning

This framework uses an old version of the Alexa SDK - skills built with it won't work with Alexa anymore.

Usage

Maven

<dependency>
    <groupId>de.mkammerer.aleksa</groupId>
    <artifactId>aleksa</artifactId>
    <version>1.2</version>
</dependency>

Gradle

compile group: 'de.mkammerer.aleksa', name: 'aleksa', version: '1.2'

Features

  • Embedded Jetty server
  • Configurable via code or commandline flags
  • Supports hosting multiple skills in one application
  • Convenience functions for plaintext responses, SSML, repromts, slots, sessions and more
  • Dev mode which simplifies skill testing while development
  • TLS
  • Metrics

Example

Speechlet implementation:

// Inherit from SpeechletV2Base, it implements SpeechletV2 and implements optional methods with empty bodies
class HelloWorldSpeechlet : SpeechletV2Base() {
    override fun onIntent(requestEnvelope: SpeechletRequestEnvelope<IntentRequest>): SpeechletResponse {
        val intent = requestEnvelope.request.intent

        return when (intent.name) {
        // use the tell function to create a tell response
            "HelloWorldIntent" -> tell("Hello world")
        // The BuiltInIntents object contains the Alexa built-in intents
            BuiltInIntents.CANCEL, BuiltInIntents.STOP -> tell("Good bye")
        // use the ask function to create an ask response
            else -> ask("What do you want to do?")
        }
    }

    override fun onLaunch(requestEnvelope: SpeechletRequestEnvelope<LaunchRequest>): SpeechletResponse {
        return ask("Hello world. What do you want to do?")
    }
}

Application:

// Start with --help to see available commandline options
fun main(args: Array<String>) {
    // Create your speechlet
    val speechlet = HelloWorldSpeechlet()
    // Add the speechlet to Aleksa
    Aleksa.addSpeechlet(path = "/helloworld", applicationId = "[Your skill id]", speechlet = speechlet)
    // Start Aleksa with the commandline parameters of your application
    Aleksa.start(args)
}

Run it with --interface 127.0.0.1 --port 8080 --dev. Now you can test the skill with curl or some other tool at the url http://127.0.0.1:8080/helloworld.

If you don't specify any commandline arguments, it binds to all interfaces on port 8080 and without dev mode. The dev mode disables request signature checking, timestamp checking and application id verification. It also shows some information on / to ease debugging infrastructure problems (reverse proxies, etc.).

If you want metrics (statistics on how often your skills are executed), add --metrics and check the /metrics endpoint.

For more examples see the examples directory.

Commandline parameters

 -d,--dev                          Enable development mode
 -h,--help                         Prints help
 -i,--interface <arg>              Interface to bind to
 -ka,--key-alias <arg>             Key alias. If not set, a key will be
                                   automatically selected
 -kpw,--key-password <arg>         Key password. If not set, the keystore
                                   password will be used
 -ks,--keystore <arg>              Location to the keystore
 -kspw,--keystore-password <arg>   Keystore password
 -m,--metrics                      Enable metrics
 -p,--port <arg>                   Port to bind to

Documentation

License

LGPLv3

Contributing

See contributing guidelines.

Maintainer

Moritz Kammerer (phXql)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].