Robbie Visio Web SDK

Below you will find the javascript SDK to send image based events for emotion recognition.

QUICKSTART

Installation

1
npm install robbie-visio-sdk

Start Recording

To start recording define the Robbie API token and the parameters to identify the session.

Tip

User Profile Labels

There are two kinds of labels: user labels, and general labels.

  • User labels are those attached to the user, and are marked with the character $ as first char.
  • WHen using user labels you must attached at least an $id property to identify it.
  • General labels do not have any restriction in format
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
RobbieVisio.init('api-token', {
  label: "online-clinic",
  $patient_name: "Joe",
  $id: "Joe_Doe_882774g",
  $patient_illness: "depression",
  doctor_name: "Mike",
  treatment: "doxepin"
})
  .then(function() {
    // Every time event is sent, this callback will be executed
  })
  .catch(function(error) {
    // Something bad happened
    console.log(error);
  });

Update Parameters

If you need to update parameters whilst events are being recorded, just call RobbieVisio.updateParameters.

1
2
3
4
5
6
7
8
RobbieVisio.updateParameters({
  label: "online-consultation",
  $patient_name: "Joe",
  $id: "Joe_Doe_882774g",
  $pacient_illness: "hyperactivity",
  doctor_name: "Mike",
  treatment: "atomoxetine"
})

Stop Recording

Close the session whenever possible so unwanted events are not sent.

1
RobbieVisio.stop();