/say-something-nice

Software for the Watson Naughty-or-Nice Candy Machine

Primary LanguageJavaScript

Say Something Nice

Screenshot

Introduction

This the software used for in the Watson Naughty-or-Nice Candy Machine. Here is the complete tutorial on Medium on how to put build the candy machine.

This is a simple Flask web application that uses the Watson Speech to Text service for voice transcription and the Watson AlchemyLanguage sentiment analysis to score the sentiment of the words.

The front end (client.js) uses the Watson Javascript Speech To Text SDK to communicate with the Watson Speech to Text service via WebSocket. The back end uses the Watson Developer Cloud Python SDK to access the AlchemyLanguage endpoints.

Installation

There's no installation required. Simply clone the repository to run the server on localhost. You do, however, need to create your own .env file since I use python-dotenv to manage my credentials. You .env file should look like this.

.env

STT_USERNAME=*your watson speech to text service credential*
STT_PASSWORD=*your watson speech to text service credential*
ALCHEMY_API_KEY=*your alchemy api key*

To Run

python server.py if there is no Arduino board connected.

python server.py arduino if there is an Arduino board connected.

Note: defaults to localhost:5000

License

This project is licensed under the terms of the MIT license. You can check out the full license here.