Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

A demonstration that creates a mobile voice experience from a Rasa bot and Spokestack Tray.

Notifications You must be signed in to change notification settings

spokestack/rasa-example-android

Repository files navigation

Spokestack Rasa Sample Integration

This is a sample project that demonstrates how to integrate the Android version of Spokestack Tray with Rasa Open Source.

What You'll Need

A Spokestack Account

They're free! Sign up on our website.

A Rasa Bot

mkdir spokestack-rasa && cd spokestack-rasa
python3 -m venv spokestack-rasa
source spokestack-rasa/bin/activate
pip install rasa
rasa init

# follow the on-screen prompts, using the default options, then...

rasa run

Ngrok

ngrok http 5005
# copy the https:// address for the next step

This Repo

Make the following substitutions in MainActivity:

    override fun getTrayConfig(): TrayConfig {
        // 1: paste the ngrok URL you copied earlier
        val rasaOssURL = "https://<ngrok-tunne>.ngrok.io"
        val wakewordURL = "https://d3dmqd7cy685il.cloudfront.net/model/wake/spokestack"
        return TrayConfig.Builder()
            // 2: swap in an API ID and secret key (found in the "credentials"
            //    section in your Spokestack account)
            .credentials("client-id", "secret-key")
            .wakewordModelURL(wakewordURL)
            .rasaOssURL("$rasaOssURL/webhooks/rest/webhook")
            .logLevel(EventTracer.Level.PERF.value())
            .withListener(this)
            .build()
    }

About

A demonstration that creates a mobile voice experience from a Rasa bot and Spokestack Tray.

Topics

Resources

Stars

Watchers

Forks

Languages