Alexa Skill for VPR Digital
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests a program reorder has been requested May 18, 2017
vpr_alexa
.gitignore
Procfile
README.md
post-local.sh
post.sh
requirements.txt
runtime.txt
tox.ini

README.md

Vermont Public Radio Alexa Skill

This project is a Flask-Ask-based web application, providing a Voice User Interface to Vermont Public Radio programming.

Using Alexa AudioDirectives, it allows users to:

  • play episodic (podcast) VPR programming
  • stream live VPR programming including:
    • VPR Live Stream
    • VPR Jazz
    • VPR Classical
    • VPR Replay

Running the Alexa Skill

It's easiest to run the skill in Heroku using the provided Procfile. Follow the getting started on Heroku with Python documentation online.

  • FLASK_SECRET_KEY
  • DISABLE_ASK_VERIFY_REQUESTS (optional)
    • True - Flask-Ask will not confirm the request originated from Amazon (allowing you to test from any system)
    • False - [Default] all requests are checked to see if they originate from Amazon
  • REDIS_URL (optional)
    • A Heroku-like URL to a Redis instance to use for Alexa session caching.
    • Note: Heroku-like means following the redis://h:.. pattern. If you add a Redis add-on via Heroku, it should automatically set this environment variable on your dyno.

Application Design

The project is logically split out across a few modules:

  • webapp.py - main web application logic, including Alexa Skills Kit intent handling
  • programs.py - VPR programming data model, integration to VPR's podcast site for lookups
  • wsgi.py - WSGI setup for running in something like gunicorn

Note: All Alexa requests target the /ask path on the application.

Contributing

The project is built to work with both Python 2.7 and Python 3.6. If you'd like to hack on the source code, it's recommended to use a Python virtual environment.

Building the Project

  1. Clone the project: git clone https://github.com/vprnet/vpr-alexa-skill
  2. Install dependencies: pip install -r requirements.txt
  3. Verify you project through testing!
  • Using tox: tox
  • Using pytest directly: pytest

Tests!

The project uses the pytest framework, keeping testing simple and straightforward.