Powering brain-computer interfaces with JavaScript

GitHub Docs

Get Started

Perform online and offline processing in Node.js with our NPM package, or get started directly in your browser with the jsDelivr CDN.

 
Node.js
npm install bcijs
Browser
<script src="https://cdn.jsdelivr.net/npm/bcijs@1.8.0/dist/bci.min.js"></script>

Signal Processing

Isolate specific brainwaves with methods such as the fast fourier transform, common spatial pattern, FastICA, and more.

Find more examples in our GitHub repo and our docs.

Machine Learning

Epoch data, build features, and train a classifier to identify different thoughts and states of mind.

Find more examples in our GitHub repo and our docs.

Real Time

Fast enough for real time processing and classification, all in JavaScript. Methods run entirely in your browser or Node.js.

Read more about BCI.js (formerly WebBCI) and the state of BCIs in the web in our paper.

Method Run Times (16 channels, 128 samples)
BandpowerCommon spatial pattern (CSP)Linear discriminant analysis (LDA)
< 1 ms< 4 ms< 1 ms

Benchmarks for three common processing methods within BCI.js. Tested in Google Chrome on an iPhone 8, a Nexus 5X, a Surface Book, and a Lenovo Ideacentre.