Data Stream API

Streams are the basic building blocks of any PhysioLabXR paradigm. Streams are connected to data sources that produces data over time. PhysioLabXR has the following hooks to connect to data sources and create streams:

  1. Network (LSL or ZMQ): connects to data streams broadcasted through the local area network.Streaming data over the data over the network is the quickest way to get started with PhysioLabXR, if you have a data source that supports one of the network APIs that PhysioLabXR supports. PhysioLabXR supports two popular network APIs for streaming experiment data: LSL and ZMQ. This is also the recommended way to stream data to and from other software such as game engines (e.g., Unity).

Note

There are some caveats to consider when choosing between LSL and ZMQ. LSL is not suited for streams with a large number of channels (e.g., video), because each channel carries its own meta information and transmitting the meta information every frame creates a large overhead. For such streams, we recommend using ZMQ.

  1. Python API: for devices that has Python API, such as brainflow for OpenBCI devices, you can write your own data source script and connect it to PhysioLabXR through the scripting interface. Check out this page on how to do it.

  2. Video and audio devices: for devices recognized by the OS as webcams or microphones, they will automatically appear on the list of devices available to stream in PhysioLabXR. More information here.