Real Time Tone Analysis samples dictation or conversations and displays a real-time transcription and an accompanying chart that plots the emotional, social, and writing tone of the language.
The project is an experiment that combines the Watson Speech to Text and Tone Analysis services, integrating them in a node.js backend running on IBM Bluemix.
There are many real world opportunities for combining these services. For example in call centers, offering instant feedback to operators, so that they can measure and control their response, or companies that run call centres to be concsious of repsonse levels over time.
The same combination of technology might be used personally to help an individual learn about their engagement and responses and manage it for themselves. This becomes especially interesting when tying the technology to other data sources, for example health data.
Health organizations, or insurance companies might encourage individuals to manage their emotions in connection with physical health - imagine being able to understand how an emotional conversation affects your pulse or blood pressure - and how health connected devices could feedback stimulus to help you be aware of that and manage it.
-
If you do not already have a Bluemix account, sign up here
-
Download and install the Cloud Foundry CLI tool
-
Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/IBM-Bluemix/real-time-tone-analysis.git
-
cd
into this newly created directory -
Open the
manifest.yml
file and change thehost
value to something unique.
The host you choose will determinate the subdomain of your application's URL: <host>.mybluemix.net
- Connect to Bluemix in the command line tool and follow the prompts to log in
$ cf api https://api.ng.bluemix.net
$ cf login
- Create the Speech to Text service in Bluemix
$ cf create-service speech_to_text standard rtt-speech-to-text
- Create the Tone Analyzer service in Bluemix
$ cf create-service tone_analyzer beta rtt-tone-analyzer
- Push the app to Bluemix.
$ cf push
And voila! You now have your very own instance of Real Time Tone running on Bluemix.
-
If you do not already have a Bluemix account, sign up here
-
If you have not already, download node.js and install it on your local machine
-
You must also have gulp.js installed to run some post-install tasks
npm install -g gulp
-
Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/IBM-Bluemix/real-time-tone-analysis.git
-
cd
into this newly created directory -
Install the required npm and bower packages using the following command
npm install
-
Create a Speech to Text service and a Tone Analyzer service using your Bluemix account. Once you've done this, provision credentials for each service and use them to populate the corresponding parameters in your
vcap-local.json
file. -
Build the app code necessary for speech-to-text using Browserify
npm run build
- Start your app locally
npm start
Your app will be automatically assigned to a port which will be logged to your terminal. To access the app, go to localhost:PORT
in your browser. Happy developing!
The primary source of debugging information for your Bluemix app is the logs. To see them, run the following command using the Cloud Foundry CLI:
$ cf logs realtime-tone --recent
For more detailed information on troubleshooting your application, see the Troubleshooting section in the Bluemix documentation.
We are more than happy to accept external contributions to this project, be it in the form of issues and pull requests. If you find a bug, please report it via the Issues section or even better, fork the project and submit a pull request with your fix! Pull requests will be evaulated on an individual basis based on value add to the sample application.
The real-time-tone-analysis sample web application includes code to track deployments to Bluemix and other Cloud Foundry platforms. The following information is sent to a Deployment Tracker service on each deployment:
- Application Name (application_name)
- Space ID (space_id)
- Application Version (application_version)
- Application URIs (application_uris)
This data is collected from the VCAP_APPLICATION environment variable in IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Bluemix. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.
Deployment tracking can be disabled by removing require("cf-deployment-tracker-client").track();
from the beginning of the app.js
file.