/utopia-alexa-skill

[Available in Alexa Skills Store] An Alexa skill developed in Python to help people with depression.

Primary LanguagePythonMIT LicenseMIT

Utopia: An Alexa skill that helps with depression

Build Status codecov HitCount

Utopia is the name of the Alexa skill that is designed to help people with depression.

The skill has passed certification, and is now live and available at the Alexa Skills Store located here: Utopia Alexa Skill

Architecture

alt text

Description

According to the World Health Organization, 350 million people worldwide suffer from depression. Depression is the leading cause of disability.

This skill is meant to help people who are going through depression. The main feature of this skill involves taking the Hamilton Depression Rating Scale Survey to get a general idea of the severity of depression, and based on the score of the survey, the skill would recommend certain natural remedies to help. The other complementary features include giving positive and motivational quotes (other types of quotes are also supported), proposing natural solutions, a mindfulness meditation exercise, recommendations for nearby therapists, and, if necessary, getting help from the National Suicide Prevention Lifeline.

Disclaimer: Utopia is not meant to be a substitute for professional medical advice, treatment or diagnosis. It is more of a supplemental and informational helper to mitigate depression. The people who programmed this are not experts in mental illnesses such as depression, and this is a product of our subjectivity and couple months of basic research on depression.

Features

  • Hamilton Depression Rating Scale Survey consisting of 16 questions to analyze and evaluate level of depression.
    • Added three bonus questions that uses NLTK sentiment analysis to contribute to the survey score.
  • Listen to different categories of quotes from BrainyQuote
    • A few popular categories of quotes include positive, motivational, inspirational, family, love, and positive.
  • Listen to advice and ideas for activities to improve mood
    • Examples include:
      • Listen to music that makes you feel good.
      • Take note of all the small things you've accomplished today.
  • Listen to a collection of uplifting & powerful poems
  • Recommend therapists nearby using Google Places API by providing contact information, current availability, and open hours
    • Will find nearby available therapists, and if there are no open therapists nearby, will default to all nearby therapist places (open or closed)
  • National Suicide Prevention Lifeline
    • If certain trigger words are said, this feature will automatically trigger and provide user with contact information for the suicide hotline.
    • For a full list of trigger words, see Trigger Words

Technology

Utopia is powered by Python, Flask-Ask (an extension of Flask, a micro web framework), and the Alexa Skills kit.

Usage

Different from the skill name, the invocation name is 'happy place'.

To start using it, say a simple invocation phrase, such as the following listed below:

Starting Phrase Example
<invocation name> Alexa, happy place
Launch <invocation name> Alexa, Launch happy place
Open <invocation name> Alexa, Open happy place
Start <invocation name> Alexa, Start happy place

To start and hear the available features, you can say the following:

Alexa, ask happy place for available features

Testing & Code Coverage

To run tests and check code coverage, run the following command in the root project folder:

$ pytest tests/test_utopia_unit.py -v —cov utopia —cov-report term-missing

The project uses pytest as the test runner. The command above will execute the tests and check for test code coverage of the main program (utopia.py), and report which lines were not covered by the test suite (test_utopia_unit.py).

Travis CI

This project uses Travis-CI, a hosted, distributed continuous integration service that builds and tests software hosted on GitHub. Every commit that is pushed to a GitHub repo automatically triggers Travis CI to run, build and test your software.

The continuous integration configuration is specified in .travis.yml file, and specifies the programming language used, desired building and testing environments, and various other parameters. For this project, the configuration is set up to create environment variables, install necessary dependencies, run the test suite, and after a successful test run, report code coverage.

Travis CI generates a badge with the current build status (displayed above). Click on the badge for more information.

Codecov

This project uses Codecov to generate code coverage reports. Codecov is a free, open source code coverage reporting tool that integrates seamlessly with GitHub. It calculates and measures code coverage and delivers the coverage metrics in a clear, understandable way. Similar to Travis CI, Codecov also generates a clickable badge with the current code coverage metrics.

License

See the LICENSE file for license rights and limitations (MIT).