emotion-tracker-js
A js wrapper for our Emotion Recognition engine. Gives developers easy access to the user's emotion.
Docs
How to use
It all revolves around the EmotionTracker
class.
First install this library
npm install 'emotion-tracker-js'
Import and initialize our tracker!
let {} let emotionTracker = emotionUpdateCallbackemotionTracker// You need to take the pictures and establish the connection with the webcam and use that// ... Webcam code that takes picturelet emotion = emotionTracker// As soon as the api request is resolved, the callback you specified will be called '// and you will have access to the newest emotion state of the user. You can use the variable emotion as well.
Callbacks and State Management
This npm module exports a main class EmotionTracker
which uses javascript proxies by which the user will be notified each time the user's emotion changes.
Developers can easily abstract their functionality into a callback which accepts the following arguments
{ // do whatever you want with these}
The callback is invoked with the parameters of the property that is changed in the emotion state object as well as the value it is taking.