training
This method is to control the training of the mental command and facial expression detections. Before you start a training, you should subscribe to the "sys" data stream.
See BCI for details.
Parameters
Name | Type | Required | Description |
cortexToken |
| yes | A token returned by authorize. |
session |
| yes | A session id returned by createSession. The training will be for the headset linked to this session. |
detection |
| yes | Must be "mentalCommand" or "facialExpression". |
status |
| yes | Control what this method does, like start the training, or cancel it... Available status depends on which detection you selected. |
action |
| yes | The action you want to train. Available actions depends on which detection you selected. |
status
To get the available status for a detection, call getDetectionInfo, and check the field controls of the result object. Or you can check this list:
Status | Description |
start | Start a new training for the specified action. |
accept | Accept a successful training and add it to the profile. |
reject | Reject a successful training. It is not added to the profile. |
reset | Cancel the current training. |
erase | Erase all the training data for the specified action. |
action
To get the available actions for a detection, call getDetectionInfo, and check the field actions of the result object.
However, note that for the facial expression detection, only these actions can be trained: "neutral", "surprise", "frown", "smile", "clench".
Result
The result is an object containing these fields:
Name | Type | Description |
action |
| The action you set in the request. |
status |
| The status you set in the request. |
message |
| A success message. |
Examples
Start a training
Start a mental command training for the action "push".
Accept a training
Accept a successful training for the action "push".
Last updated