For implementation APIs:
- Python: Python Streaming Inference —
StreamingSession,StreamingSessionSTS, BrainState bridge - Frozen-encoder apps: Personalizer for app-facing decisions
- Julia: Julia Streaming Inference
Streaming vs Batch
Use batch inference when full trials are already available and you are doing offline evaluation, model validation, or analytics. Use streaming inference when embedding or feature chunks arrive over time and the application needs low-latency updates before a complete trial has finished.Core Configuration
Every streaming setup needs:sampling_rate: acquisition rate in Hz.chunk_size: number of samples per chunk.paradigm: task type such as motor imagery, P300, or SSVEP.feature_type: feature representation such as CSP, bandpower, or ERP amplitude.n_features: feature count per chunk.n_classes: number of output classes.temporal_aggregation: how to reduce feature time structure when required.
Chunk Size Guidelines
Start with 0.5-1.0s chunks for motor imagery and adjust based on confidence, latency, and user experience.
Aggregation Methods
Streaming produces one posterior per chunk. Trial-level decisions combine those chunk posteriors.Quality Gates
Streaming systems should monitor:- confidence (
max posterior probability) - entropy (
prediction uncertainty) - class balance over recent trials
- rejection rate
- per-chunk and per-trial latency
Next read
Python Streaming Inference
Python
StreamingSession API and STS state handlingJulia Streaming Inference
Julia streaming API for local chunk processing
Real-Time BCI Setup
Hardware, LSL, BrainFlow, and acquisition loops
Batch Processing
Offline trial processing and diagnostics